home *** CD-ROM | disk | FTP | other *** search
/ Mac Power 1997 January / macpower199701.bin / AMUG / Programming_10 / ICPAppSource+ICprogKit / ICProgKit 1.3.sit / ICProgKit1.3 / APIs / ICAPI.p < prev    next >
MacBinary  |  1996-07-14  |  40.8 KB  |  [TEXT/CWIE]

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

This file was processed as: MacBinary (archive/macBinary).

You can browse this item here: ICAPI.p

ConfidenceProgramDetectionMatch TypeSupport
66% dexvert ZX81 Sinclair BASIC (image/sinclairBASIC) ext Supported
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Applause Picture (image/applausePicture) ext Unsupported
1% dexvert bsdiff patch (other/bsdiffPatch) ext Unsupported
1% dexvert imgdiff patch (other/imgdiffPatch) ext Unsupported
1% dexvert MATLAB p-code (other/matlabPCode) ext Unsupported
1% dexvert WSUS Patch Storage File (other/wsusPatchStorageFile) ext Unsupported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, inited, Sun Jul 14 20:37:12 1996, modified Sun Jul 14 20:37:12 1996, creator 'CWIE', type ASCII, 25494 bytes "ICAPI.p" , at 0x6416 15912 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[CWIE]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 07 49 43 41 50 49 2e | 70 00 00 00 00 00 00 00 |..ICAPI.|p.......|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 43 57 49 | 45 01 00 00 00 00 00 00 |.TEXTCWI|E.......|
|00000050| 00 00 00 00 00 63 96 00 | 00 3e 28 ae 0f 43 38 ae |.....c..|.>(..C8.|
|00000060| 0f 43 38 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |.C8.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 b5 7e 00 00 |........|.....~..|
|00000080| 75 6e 69 74 20 49 43 41 | 50 49 3b 0d 0d 28 2a 20 |unit ICA|PI;..(* |
|00000090| a5 a5 a5 53 74 61 72 74 | 20 48 65 61 64 65 72 a5 |...Start| Header.|
|000000a0| a5 a5 20 2a 29 0d 0d 28 | 2a 20 46 69 6c 65 3a 20 |.. *)..(|* File: |
|000000b0| 20 20 20 20 20 20 20 20 | 49 43 41 50 49 2e 70 20 | |ICAPI.p |
|000000c0| 28 69 6e 74 66 29 0d 20 | 2a 20 47 65 6e 65 72 61 |(intf). |* Genera|
|000000d0| 74 65 64 20 62 79 3a 20 | 31 2e 30 64 34 0d 20 2a |ted by: |1.0d4. *|
|000000e0| 20 46 6f 72 3a 20 20 20 | 20 20 20 20 20 20 20 49 | For: | I|
|000000f0| 43 20 31 2e 33 0d 20 2a | 20 4f 6e 3a 20 20 20 20 |C 1.3. *| On: |
|00000100| 20 20 20 20 20 20 20 53 | 75 6e 64 61 79 2c 20 31 | S|unday, 1|
|00000110| 34 20 4a 75 6c 79 20 31 | 39 39 36 2c 20 32 30 3a |4 July 1|996, 20:|
|00000120| 31 39 3a 35 35 0d 20 2a | 20 0d 20 2a 20 54 68 69 |19:55. *| . * Thi|
|00000130| 73 20 66 69 6c 65 20 69 | 73 20 70 61 72 74 20 6f |s file i|s part o|
|00000140| 66 20 74 68 65 20 49 6e | 74 65 72 6e 65 74 20 43 |f the In|ternet C|
|00000150| 6f 6e 66 69 67 75 72 61 | 74 69 6f 6e 20 73 79 73 |onfigura|tion sys|
|00000160| 74 65 6d 20 61 6e 64 0d | 20 2a 20 69 73 20 70 6c |tem and.| * is pl|
|00000170| 61 63 65 64 20 69 6e 20 | 74 68 65 20 70 75 62 6c |aced in |the publ|
|00000180| 69 63 20 64 6f 6d 61 69 | 6e 20 66 6f 72 20 74 68 |ic domai|n for th|
|00000190| 65 20 62 65 6e 65 66 69 | 74 20 6f 66 20 61 6c 6c |e benefi|t of all|
|000001a0| 2e 0d 20 2a 29 0d 0d 28 | 2a 20 a5 a5 a5 45 6e 64 |.. *)..(|* ...End|
|000001b0| 20 48 65 61 64 65 72 a5 | a5 a5 20 2a 29 0d 0d 69 | Header.|.. *)..i|
|000001c0| 6e 74 65 72 66 61 63 65 | 0d 0d 09 75 73 65 73 0d |nterface|...uses.|
|000001d0| 7b 24 69 66 63 20 75 6e | 64 65 66 69 6e 65 64 20 |{$ifc un|defined |
|000001e0| 54 48 49 4e 4b 5f 50 61 | 73 63 61 6c 7d 0d 09 09 |THINK_Pa|scal}...|
|000001f0| 54 79 70 65 73 2c 20 46 | 69 6c 65 73 2c 20 51 75 |Types, F|iles, Qu|
|00000200| 69 63 6b 44 72 61 77 2c | 20 41 70 70 6c 65 54 61 |ickDraw,| AppleTa|
|00000210| 6c 6b 2c 20 41 6c 69 61 | 73 65 73 2c 20 0d 7b 24 |lk, Alia|ses, .{$|
|00000220| 65 6e 64 63 7d 0d 09 09 | 49 43 54 79 70 65 73 2c |endc}...|ICTypes,|
|00000230| 20 49 43 4b 65 79 73 3b | 0d 0d 28 2a 20 a5 a5 a5 | ICKeys;|..(* ...|
|00000240| 53 74 61 72 74 20 49 43 | 41 50 49 2e 70 a5 a5 a5 |Start IC|API.p...|
|00000250| 20 2a 29 0d 0d 20 20 28 | 2a 20 2a 2a 2a 2a 2a 20 | *).. (|* ***** |
|00000260| 53 74 61 72 74 69 6e 67 | 20 55 70 20 61 6e 64 20 |Starting| Up and |
|00000270| 53 68 75 74 74 69 6e 67 | 20 44 6f 77 6e 20 2a 2a |Shutting| Down **|
|00000280| 2a 2a 2a 20 2a 29 0d 20 | 20 0d 20 20 66 75 6e 63 |*** *). | . func|
|00000290| 74 69 6f 6e 20 49 43 53 | 74 61 72 74 28 76 61 72 |tion ICS|tart(var|
|000002a0| 20 69 6e 73 74 20 3a 20 | 49 43 49 6e 73 74 61 6e | inst : |ICInstan|
|000002b0| 63 65 3b 20 63 72 65 61 | 74 6f 72 20 3a 20 4f 53 |ce; crea|tor : OS|
|000002c0| 54 79 70 65 29 20 3a 20 | 49 43 45 72 72 6f 72 3b |Type) : |ICError;|
|000002d0| 0d 20 20 20 20 28 2a 20 | 43 61 6c 6c 20 74 68 69 |. (* |Call thi|
|000002e0| 73 20 61 74 20 61 70 70 | 6c 69 63 61 74 69 6f 6e |s at app|lication|
|000002f0| 20 69 6e 69 74 69 61 6c | 69 73 61 74 69 6f 6e 2e | initial|isation.|
|00000300| 20 53 65 74 20 63 72 65 | 61 74 6f 72 20 74 6f 20 | Set cre|ator to |
|00000310| 79 6f 75 72 20 61 70 70 | 6c 69 63 61 74 69 6f 6e |your app|lication|
|00000320| 0d 20 20 20 20 20 2a 20 | 63 72 65 61 74 6f 72 20 |. * |creator |
|00000330| 74 6f 20 61 6c 6c 6f 77 | 20 66 6f 72 20 66 75 74 |to allow| for fut|
|00000340| 75 72 65 20 65 78 70 61 | 6e 73 69 6f 6e 20 6f 66 |ure expa|nsion of|
|00000350| 20 74 68 65 20 49 43 20 | 73 79 73 74 65 6d 2e 20 | the IC |system. |
|00000360| 52 65 74 75 72 6e 73 0d | 20 20 20 20 20 2a 20 69 |Returns.| * i|
|00000370| 6e 73 74 20 61 73 20 61 | 20 63 6f 6e 6e 65 63 74 |nst as a| connect|
|00000380| 69 6f 6e 20 74 6f 20 74 | 68 65 20 49 43 20 73 79 |ion to t|he IC sy|
|00000390| 73 74 65 6d 2e 0d 20 20 | 20 20 20 2a 29 0d 20 20 |stem.. | *). |
|000003a0| 0d 20 20 66 75 6e 63 74 | 69 6f 6e 20 49 43 53 74 |. funct|ion ICSt|
|000003b0| 6f 70 28 69 6e 73 74 20 | 3a 20 49 43 49 6e 73 74 |op(inst |: ICInst|
|000003c0| 61 6e 63 65 29 20 3a 20 | 49 43 45 72 72 6f 72 3b |ance) : |ICError;|
|000003d0| 0d 20 20 20 20 28 2a 20 | 49 74 20 69 73 20 69 6c |. (* |It is il|
|000003e0| 6c 65 67 61 6c 20 74 6f | 20 63 61 6c 6c 20 74 68 |legal to| call th|
|000003f0| 69 73 20 72 6f 75 74 69 | 6e 65 20 69 6e 73 69 64 |is routi|ne insid|
|00000400| 65 20 61 20 49 43 42 65 | 67 69 6e 2f 45 6e 64 20 |e a ICBe|gin/End |
|00000410| 70 61 69 72 2e 0d 20 20 | 20 20 20 2a 20 43 61 6c |pair.. | * Cal|
|00000420| 6c 20 74 68 69 73 20 61 | 74 20 61 70 70 6c 69 63 |l this a|t applic|
|00000430| 61 74 69 6f 6e 20 69 6e | 69 74 69 61 6c 69 73 61 |ation in|itialisa|
|00000440| 74 69 6f 6e 2c 20 61 66 | 74 65 72 20 77 68 69 63 |tion, af|ter whic|
|00000450| 68 20 69 6e 73 74 0d 20 | 20 20 20 20 2a 20 69 73 |h inst. | * is|
|00000460| 20 6e 6f 20 6c 6f 6e 67 | 65 72 20 76 61 6c 69 64 | no long|er valid|
|00000470| 20 63 6f 6e 6e 65 63 74 | 69 6f 6e 20 74 6f 20 49 | connect|ion to I|
|00000480| 43 2e 0d 20 20 20 20 20 | 2a 29 0d 20 20 0d 20 20 |C.. |*). . |
|00000490| 28 2a 20 2a 2a 2a 2a 2a | 20 53 70 65 63 69 66 79 |(* *****| Specify|
|000004a0| 69 6e 67 20 61 20 43 6f | 6e 66 69 67 75 72 61 74 |ing a Co|nfigurat|
|000004b0| 69 6f 6e 20 2a 2a 2a 2a | 2a 20 2a 29 0d 20 20 0d |ion ****|* *). .|
|000004c0| 20 20 66 75 6e 63 74 69 | 6f 6e 20 49 43 46 69 6e | functi|on ICFin|
|000004d0| 64 43 6f 6e 66 69 67 46 | 69 6c 65 28 69 6e 73 74 |dConfigF|ile(inst|
|000004e0| 20 3a 20 49 43 49 6e 73 | 74 61 6e 63 65 3b 20 63 | : ICIns|tance; c|
|000004f0| 6f 75 6e 74 20 3a 20 69 | 6e 74 65 67 65 72 3b 20 |ount : i|nteger; |
|00000500| 66 6f 6c 64 65 72 73 20 | 3a 20 49 43 44 69 72 53 |folders |: ICDirS|
|00000510| 70 65 63 41 72 72 61 79 | 50 74 72 29 20 3a 20 49 |pecArray|Ptr) : I|
|00000520| 43 45 72 72 6f 72 3b 0d | 20 20 20 20 28 2a 20 49 |CError;.| (* I|
|00000530| 74 20 69 73 20 69 6c 6c | 65 67 61 6c 20 74 6f 20 |t is ill|egal to |
|00000540| 63 61 6c 6c 20 74 68 69 | 73 20 72 6f 75 74 69 6e |call thi|s routin|
|00000550| 65 20 69 6e 73 69 64 65 | 20 61 20 49 43 42 65 67 |e inside| a ICBeg|
|00000560| 69 6e 2f 45 6e 64 20 70 | 61 69 72 2e 0d 20 20 20 |in/End p|air.. |
|00000570| 20 20 2a 20 43 61 6c 6c | 20 74 6f 20 63 6f 6e 66 | * Call| to conf|
|00000580| 69 67 75 72 65 20 74 68 | 69 73 20 63 6f 6e 6e 65 |igure th|is conne|
|00000590| 63 74 69 6f 6e 20 74 6f | 20 49 43 2e 0d 20 20 20 |ction to| IC.. |
|000005a0| 20 20 2a 20 53 65 74 20 | 63 6f 75 6e 74 20 61 73 | * Set |count as|
|000005b0| 20 74 68 65 20 6e 75 6d | 62 65 72 20 6f 66 20 76 | the num|ber of v|
|000005c0| 61 6c 69 64 20 65 6c 65 | 6d 65 6e 74 73 20 69 6e |alid ele|ments in|
|000005d0| 20 66 6f 6c 64 65 72 73 | 2e 0d 20 20 20 20 20 2a | folders|.. *|
|000005e0| 20 53 65 74 20 66 6f 6c | 64 65 72 73 20 74 6f 20 | Set fol|ders to |
|000005f0| 61 20 70 6f 69 6e 74 65 | 72 20 74 6f 20 74 68 65 |a pointe|r to the|
|00000600| 20 66 6f 6c 64 65 72 73 | 20 74 6f 20 73 65 61 72 | folders| to sear|
|00000610| 63 68 2e 0d 20 20 20 20 | 20 2a 20 53 65 74 74 69 |ch.. | * Setti|
|00000620| 6e 67 20 63 6f 75 6e 74 | 20 74 6f 20 30 20 61 6e |ng count| to 0 an|
|00000630| 64 20 66 6f 6c 64 65 72 | 73 20 74 6f 20 6e 69 6c |d folder|s to nil|
|00000640| 20 69 73 20 4f 4b 2e 0d | 20 20 20 20 20 2a 20 53 | is OK..| * S|
|00000650| 65 61 72 63 68 65 73 20 | 74 68 65 20 73 70 65 63 |earches |the spec|
|00000660| 69 66 69 65 64 20 66 6f | 6c 64 65 72 73 20 61 6e |ified fo|lders an|
|00000670| 64 20 74 68 65 6e 20 74 | 68 65 20 50 72 65 66 65 |d then t|he Prefe|
|00000680| 72 65 6e 63 65 73 20 66 | 6f 6c 64 65 72 0d 20 20 |rences f|older. |
|00000690| 20 20 20 2a 20 69 6e 20 | 61 20 75 6e 73 70 65 63 | * in |a unspec|
|000006a0| 69 66 69 65 64 20 6d 61 | 6e 6e 65 72 2e 0d 20 20 |ified ma|nner.. |
|000006b0| 20 20 20 2a 29 0d 20 20 | 0d 20 20 66 75 6e 63 74 | *). |. funct|
|000006c0| 69 6f 6e 20 49 43 46 69 | 6e 64 55 73 65 72 43 6f |ion ICFi|ndUserCo|
|000006d0| 6e 66 69 67 46 69 6c 65 | 28 69 6e 73 74 20 3a 20 |nfigFile|(inst : |
|000006e0| 49 43 49 6e 73 74 61 6e | 63 65 3b 20 76 61 72 20 |ICInstan|ce; var |
|000006f0| 77 68 65 72 65 20 3a 20 | 49 43 44 69 72 53 70 65 |where : |ICDirSpe|
|00000700| 63 29 20 3a 20 49 43 45 | 72 72 6f 72 3b 0d 20 20 |c) : ICE|rror;. |
|00000710| 20 20 28 2a 20 52 65 71 | 75 69 72 65 73 20 49 43 | (* Req|uires IC|
|00000720| 20 31 2e 31 2e 0d 20 20 | 20 20 20 2a 20 49 74 20 | 1.1.. | * It |
|00000730| 69 73 20 69 6c 6c 65 67 | 61 6c 20 74 6f 20 63 61 |is illeg|al to ca|
|00000740| 6c 6c 20 74 68 69 73 20 | 72 6f 75 74 69 6e 65 20 |ll this |routine |
|00000750| 69 6e 73 69 64 65 20 61 | 20 49 43 42 65 67 69 6e |inside a| ICBegin|
|00000760| 2f 45 6e 64 20 70 61 69 | 72 2e 0d 20 20 20 20 20 |/End pai|r.. |
|00000770| 2a 20 53 69 6d 69 6c 61 | 72 20 74 6f 20 49 43 46 |* Simila|r to ICF|
|00000780| 69 6e 64 43 6f 6e 66 69 | 67 46 69 6c 65 20 65 78 |indConfi|gFile ex|
|00000790| 63 65 70 74 20 74 68 61 | 74 20 69 74 20 6f 6e 6c |cept tha|t it onl|
|000007a0| 79 20 73 65 61 72 63 68 | 65 73 20 74 68 65 20 66 |y search|es the f|
|000007b0| 6f 6c 64 65 72 0d 20 20 | 20 20 20 2a 20 73 70 65 |older. | * spe|
|000007c0| 63 69 66 69 65 64 20 69 | 6e 20 77 68 65 72 65 2e |cified i|n where.|
|000007d0| 20 20 49 66 20 74 68 65 | 20 69 6e 70 75 74 20 70 | If the| input p|
|000007e0| 61 72 61 6d 65 74 65 72 | 73 20 61 72 65 20 76 61 |arameter|s are va|
|000007f0| 6c 69 64 20 74 68 65 20 | 72 6f 75 74 69 6e 65 0d |lid the |routine.|
|00000800| 20 20 20 20 20 2a 20 77 | 69 6c 6c 20 61 6c 77 61 | * w|ill alwa|
|00000810| 79 73 20 73 75 63 63 65 | 73 73 66 75 6c 20 63 6f |ys succe|ssful co|
|00000820| 6e 66 69 67 75 72 65 20 | 74 68 65 20 69 6e 73 74 |nfigure |the inst|
|00000830| 61 6e 63 65 2c 20 63 72 | 65 61 74 69 6e 67 20 61 |ance, cr|eating a|
|00000840| 6e 0d 20 20 20 20 20 2a | 20 65 6d 70 74 79 20 63 |n. *| empty c|
|00000850| 6f 6e 66 69 67 75 72 61 | 74 69 6f 6e 20 69 66 20 |onfigura|tion if |
|00000860| 6e 65 63 65 73 73 61 72 | 79 0d 20 20 20 20 20 2a |necessar|y. *|
|00000870| 20 46 6f 72 20 75 73 65 | 20 77 69 74 68 20 64 6f | For use| with do|
|00000880| 75 62 6c 65 2d 63 6c 69 | 63 6b 61 62 6c 65 20 70 |uble-cli|ckable p|
|00000890| 72 65 66 65 72 65 6e 63 | 65 20 66 69 6c 65 73 2e |referenc|e files.|
|000008a0| 0d 20 20 20 20 20 2a 29 | 0d 20 20 0d 20 20 66 75 |. *)|. . fu|
|000008b0| 6e 63 74 69 6f 6e 20 49 | 43 47 65 6e 65 72 61 6c |nction I|CGeneral|
|000008c0| 46 69 6e 64 43 6f 6e 66 | 69 67 46 69 6c 65 28 69 |FindConf|igFile(i|
|000008d0| 6e 73 74 20 3a 20 49 43 | 49 6e 73 74 61 6e 63 65 |nst : IC|Instance|
|000008e0| 3b 20 73 65 61 72 63 68 | 5f 70 72 65 66 73 20 3a |; search|_prefs :|
|000008f0| 20 42 6f 6f 6c 65 61 6e | 3b 20 63 61 6e 5f 63 72 | Boolean|; can_cr|
|00000900| 65 61 74 65 20 3a 20 42 | 6f 6f 6c 65 61 6e 3b 20 |eate : B|oolean; |
|00000910| 63 6f 75 6e 74 20 3a 20 | 69 6e 74 65 67 65 72 3b |count : |integer;|
|00000920| 20 66 6f 6c 64 65 72 73 | 20 3a 20 49 43 44 69 72 | folders| : ICDir|
|00000930| 53 70 65 63 41 72 72 61 | 79 50 74 72 29 20 3a 20 |SpecArra|yPtr) : |
|00000940| 49 43 45 72 72 6f 72 3b | 0d 20 20 20 20 28 2a 20 |ICError;|. (* |
|00000950| 52 65 71 75 69 72 65 73 | 20 49 43 20 31 2e 32 2e |Requires| IC 1.2.|
|00000960| 0d 20 20 20 20 20 2a 20 | 49 74 20 69 73 20 69 6c |. * |It is il|
|00000970| 6c 65 67 61 6c 20 74 6f | 20 63 61 6c 6c 20 74 68 |legal to| call th|
|00000980| 69 73 20 72 6f 75 74 69 | 6e 65 20 69 6e 73 69 64 |is routi|ne insid|
|00000990| 65 20 61 20 49 43 42 65 | 67 69 6e 2f 45 6e 64 20 |e a ICBe|gin/End |
|000009a0| 70 61 69 72 2e 0d 20 20 | 20 20 20 2a 20 43 61 6c |pair.. | * Cal|
|000009b0| 6c 20 74 6f 20 63 6f 6e | 66 69 67 75 72 65 20 74 |l to con|figure t|
|000009c0| 68 69 73 20 63 6f 6e 6e | 65 63 74 69 6f 6e 20 74 |his conn|ection t|
|000009d0| 6f 20 49 43 2e 0d 20 20 | 20 20 20 2a 20 54 68 69 |o IC.. | * Thi|
|000009e0| 73 20 72 6f 75 74 69 6e | 65 20 61 63 74 73 20 61 |s routin|e acts a|
|000009f0| 73 20 61 20 6d 6f 72 65 | 20 67 65 6e 65 72 61 6c |s a more| general|
|00000a00| 20 72 65 70 6c 61 63 65 | 6d 65 6e 74 20 66 6f 72 | replace|ment for|
|00000a10| 0d 20 20 20 20 20 2a 20 | 49 43 46 69 6e 64 43 6f |. * |ICFindCo|
|00000a20| 6e 66 69 67 46 69 6c 65 | 20 61 6e 64 20 49 43 46 |nfigFile| and ICF|
|00000a30| 69 6e 64 55 73 65 72 43 | 6f 6e 66 69 67 46 69 6c |indUserC|onfigFil|
|00000a40| 65 2e 0d 20 20 20 20 20 | 2a 20 53 65 74 20 73 65 |e.. |* Set se|
|00000a50| 61 72 63 68 5f 70 72 65 | 66 73 20 74 6f 20 74 72 |arch_pre|fs to tr|
|00000a60| 75 65 20 69 66 20 79 6f | 75 20 77 61 6e 74 20 69 |ue if yo|u want i|
|00000a70| 74 20 74 6f 20 73 65 61 | 72 63 68 20 74 68 65 20 |t to sea|rch the |
|00000a80| 70 72 65 66 65 72 65 6e | 63 65 73 20 66 6f 6c 64 |preferen|ces fold|
|00000a90| 65 72 2e 0d 20 20 20 20 | 20 2a 20 53 65 74 20 63 |er.. | * Set c|
|00000aa0| 61 6e 5f 63 72 65 61 74 | 65 20 74 6f 20 74 72 75 |an_creat|e to tru|
|00000ab0| 65 20 69 66 20 79 6f 75 | 20 77 61 6e 74 20 69 74 |e if you| want it|
|00000ac0| 20 74 6f 20 62 65 20 61 | 62 6c 65 20 74 6f 20 63 | to be a|ble to c|
|00000ad0| 72 65 61 74 65 20 61 20 | 6e 65 77 20 63 6f 6e 66 |reate a |new conf|
|00000ae0| 69 67 2e 0d 20 20 20 20 | 20 2a 20 53 65 74 20 63 |ig.. | * Set c|
|00000af0| 6f 75 6e 74 20 61 73 20 | 74 68 65 20 6e 75 6d 62 |ount as |the numb|
|00000b00| 65 72 20 6f 66 20 76 61 | 6c 69 64 20 65 6c 65 6d |er of va|lid elem|
|00000b10| 65 6e 74 73 20 69 6e 20 | 66 6f 6c 64 65 72 73 2e |ents in |folders.|
|00000b20| 0d 20 20 20 20 20 2a 20 | 53 65 74 20 66 6f 6c 64 |. * |Set fold|
|00000b30| 65 72 73 20 74 6f 20 61 | 20 70 6f 69 6e 74 65 72 |ers to a| pointer|
|00000b40| 20 74 6f 20 74 68 65 20 | 66 6f 6c 64 65 72 73 20 | to the |folders |
|00000b50| 74 6f 20 73 65 61 72 63 | 68 2e 0d 20 20 20 20 20 |to searc|h.. |
|00000b60| 2a 20 53 65 74 74 69 6e | 67 20 63 6f 75 6e 74 20 |* Settin|g count |
|00000b70| 74 6f 20 30 20 61 6e 64 | 20 66 6f 6c 64 65 72 73 |to 0 and| folders|
|00000b80| 20 74 6f 20 6e 69 6c 20 | 69 73 20 4f 4b 2e 0d 20 | to nil |is OK.. |
|00000b90| 20 20 20 20 2a 20 53 65 | 61 72 63 68 65 73 20 74 | * Se|arches t|
|00000ba0| 68 65 20 73 70 65 63 69 | 66 69 65 64 20 66 6f 6c |he speci|fied fol|
|00000bb0| 64 65 72 73 20 61 6e 64 | 20 74 68 65 6e 20 6f 70 |ders and| then op|
|00000bc0| 74 69 6f 6e 61 6c 6c 79 | 20 74 68 65 20 50 72 65 |tionally| the Pre|
|00000bd0| 66 65 72 65 6e 63 65 73 | 20 66 6f 6c 64 65 72 0d |ferences| folder.|
|00000be0| 20 20 20 20 20 2a 20 69 | 6e 20 61 20 75 6e 73 70 | * i|n a unsp|
|00000bf0| 65 63 69 66 69 65 64 20 | 6d 61 6e 6e 65 72 2e 0d |ecified |manner..|
|00000c00| 20 20 20 20 20 2a 29 0d | 20 20 0d 20 20 66 75 6e | *).| . fun|
|00000c10| 63 74 69 6f 6e 20 49 43 | 43 68 6f 6f 73 65 43 6f |ction IC|ChooseCo|
|00000c20| 6e 66 69 67 28 69 6e 73 | 74 20 3a 20 49 43 49 6e |nfig(ins|t : ICIn|
|00000c30| 73 74 61 6e 63 65 29 20 | 3a 20 49 43 45 72 72 6f |stance) |: ICErro|
|00000c40| 72 3b 0d 20 20 20 20 28 | 2a 20 52 65 71 75 69 72 |r;. (|* Requir|
|00000c50| 65 73 20 49 43 20 31 2e | 32 2e 0d 20 20 20 20 20 |es IC 1.|2.. |
|00000c60| 2a 20 49 74 20 69 73 20 | 69 6c 6c 65 67 61 6c 20 |* It is |illegal |
|00000c70| 74 6f 20 63 61 6c 6c 20 | 74 68 69 73 20 72 6f 75 |to call |this rou|
|00000c80| 74 69 6e 65 20 69 6e 73 | 69 64 65 20 61 20 49 43 |tine ins|ide a IC|
|00000c90| 42 65 67 69 6e 2f 45 6e | 64 20 70 61 69 72 2e 0d |Begin/En|d pair..|
|00000ca0| 20 20 20 20 20 2a 20 52 | 65 71 75 65 73 74 73 20 | * R|equests |
|00000cb0| 74 68 65 20 75 73 65 72 | 20 74 6f 20 63 68 6f 6f |the user| to choo|
|00000cc0| 73 65 20 61 20 63 6f 6e | 66 69 67 75 72 61 74 69 |se a con|figurati|
|00000cd0| 6f 6e 2c 20 74 79 70 69 | 63 61 6c 6c 79 20 75 73 |on, typi|cally us|
|00000ce0| 69 6e 67 20 73 6f 6d 65 | 0d 20 20 20 20 20 2a 20 |ing some|. * |
|00000cf0| 73 6f 72 74 20 6f 66 20 | 6d 6f 64 61 6c 20 64 69 |sort of |modal di|
|00000d00| 61 6c 6f 67 2e 20 49 66 | 20 74 68 65 20 75 73 65 |alog. If| the use|
|00000d10| 72 20 63 61 6e 63 65 6c | 73 20 74 68 65 20 64 69 |r cancel|s the di|
|00000d20| 61 6c 6f 67 20 74 68 65 | 20 63 6f 6e 66 69 67 75 |alog the| configu|
|00000d30| 72 61 74 69 6f 6e 0d 20 | 20 20 20 20 2a 20 73 74 |ration. | * st|
|00000d40| 61 74 65 20 77 69 6c 6c | 20 62 65 20 75 6e 61 66 |ate will| be unaf|
|00000d50| 66 65 63 74 65 64 2e 0d | 20 20 20 20 20 2a 29 0d |fected..| *).|
|00000d60| 20 20 0d 20 20 66 75 6e | 63 74 69 6f 6e 20 49 43 | . fun|ction IC|
|00000d70| 43 68 6f 6f 73 65 4e 65 | 77 43 6f 6e 66 69 67 28 |ChooseNe|wConfig(|
|00000d80| 69 6e 73 74 20 3a 20 49 | 43 49 6e 73 74 61 6e 63 |inst : I|CInstanc|
|00000d90| 65 29 20 3a 20 49 43 45 | 72 72 6f 72 3b 0d 20 20 |e) : ICE|rror;. |
|00000da0| 20 20 28 2a 20 52 65 71 | 75 69 72 65 73 20 49 43 | (* Req|uires IC|
|00000db0| 20 31 2e 32 2e 0d 20 20 | 20 20 20 2a 20 49 74 20 | 1.2.. | * It |
|00000dc0| 69 73 20 69 6c 6c 65 67 | 61 6c 20 74 6f 20 63 61 |is illeg|al to ca|
|00000dd0| 6c 6c 20 74 68 69 73 20 | 72 6f 75 74 69 6e 65 20 |ll this |routine |
|00000de0| 69 6e 73 69 64 65 20 61 | 20 49 43 42 65 67 69 6e |inside a| ICBegin|
|00000df0| 2f 45 6e 64 20 70 61 69 | 72 2e 0d 20 20 20 20 20 |/End pai|r.. |
|00000e00| 2a 20 52 65 71 75 65 73 | 74 73 20 74 68 65 20 75 |* Reques|ts the u|
|00000e10| 73 65 72 20 74 6f 20 63 | 72 65 61 74 65 20 61 20 |ser to c|reate a |
|00000e20| 6e 65 77 20 63 6f 6e 66 | 69 67 75 72 61 74 69 6f |new conf|iguratio|
|00000e30| 6e 2c 20 74 79 70 69 63 | 61 6c 6c 79 20 75 73 69 |n, typic|ally usi|
|00000e40| 6e 67 20 73 6f 6d 65 0d | 20 20 20 20 20 2a 20 73 |ng some.| * s|
|00000e50| 6f 72 74 20 6f 66 20 6d | 6f 64 61 6c 20 64 69 61 |ort of m|odal dia|
|00000e60| 6c 6f 67 2e 20 49 66 20 | 74 68 65 20 75 73 65 72 |log. If |the user|
|00000e70| 20 63 61 6e 63 65 6c 73 | 20 74 68 65 20 64 69 61 | cancels| the dia|
|00000e80| 6c 6f 67 20 74 68 65 20 | 63 6f 6e 66 69 67 75 72 |log the |configur|
|00000e90| 61 74 69 6f 6e 0d 20 20 | 20 20 20 2a 20 73 74 61 |ation. | * sta|
|00000ea0| 74 65 20 77 69 6c 6c 20 | 62 65 20 75 6e 61 66 66 |te will |be unaff|
|00000eb0| 65 63 74 65 64 2e 0d 20 | 20 20 20 20 2a 29 0d 20 |ected.. | *). |
|00000ec0| 20 0d 20 20 66 75 6e 63 | 74 69 6f 6e 20 49 43 47 | . func|tion ICG|
|00000ed0| 65 74 43 6f 6e 66 69 67 | 4e 61 6d 65 28 69 6e 73 |etConfig|Name(ins|
|00000ee0| 74 20 3a 20 49 43 49 6e | 73 74 61 6e 63 65 3b 20 |t : ICIn|stance; |
|00000ef0| 6c 6f 6e 67 6e 61 6d 65 | 20 3a 20 42 6f 6f 6c 65 |longname| : Boole|
|00000f00| 61 6e 3b 20 76 61 72 20 | 6e 61 6d 65 20 3a 20 53 |an; var |name : S|
|00000f10| 74 72 32 35 35 29 20 3a | 20 49 43 45 72 72 6f 72 |tr255) :| ICError|
|00000f20| 3b 0d 20 20 20 20 28 2a | 20 52 65 71 75 69 72 65 |;. (*| Require|
|00000f30| 73 20 49 43 20 31 2e 32 | 2e 0d 20 20 20 20 20 2a |s IC 1.2|.. *|
|00000f40| 20 59 6f 75 20 6d 75 73 | 74 20 73 70 65 63 69 66 | You mus|t specif|
|00000f50| 79 20 61 20 63 6f 6e 66 | 69 67 75 72 61 74 69 6f |y a conf|iguratio|
|00000f60| 6e 20 62 65 66 6f 72 65 | 20 63 61 6c 6c 69 6e 67 |n before| calling|
|00000f70| 20 74 68 69 73 20 72 6f | 75 74 69 6e 65 2e 0d 20 | this ro|utine.. |
|00000f80| 20 20 20 20 2a 20 52 65 | 74 75 72 6e 73 20 61 20 | * Re|turns a |
|00000f90| 73 74 72 69 6e 67 20 74 | 68 61 74 20 64 65 73 63 |string t|hat desc|
|00000fa0| 72 69 62 65 73 20 74 68 | 65 20 63 75 72 72 65 6e |ribes th|e curren|
|00000fb0| 74 20 63 6f 6e 66 69 67 | 75 72 61 74 69 6f 6e 20 |t config|uration |
|00000fc0| 61 74 20 61 20 75 73 65 | 72 0d 20 20 20 20 20 2a |at a use|r. *|
|00000fd0| 20 6c 65 76 65 6c 2e 20 | 53 65 74 20 6c 6f 6e 67 | level. |Set long|
|00000fe0| 6e 61 6d 65 20 74 6f 20 | 74 72 75 65 20 69 66 20 |name to |true if |
|00000ff0| 79 6f 75 20 77 61 6e 74 | 20 61 20 6c 6f 6e 67 20 |you want| a long |
|00001000| 6e 61 6d 65 2c 20 75 70 | 20 74 6f 20 32 35 35 0d |name, up| to 255.|
|00001010| 20 20 20 20 20 2a 20 63 | 68 61 72 61 63 74 65 72 | * c|haracter|
|00001020| 73 2c 20 6f 72 20 66 61 | 6c 73 65 20 69 66 20 79 |s, or fa|lse if y|
|00001030| 6f 75 20 77 61 6e 74 20 | 61 20 73 68 6f 72 74 20 |ou want |a short |
|00001040| 6e 61 6d 65 2c 20 74 79 | 70 69 63 61 6c 6c 79 20 |name, ty|pically |
|00001050| 61 62 6f 75 74 20 33 32 | 0d 20 20 20 20 20 2a 20 |about 32|. * |
|00001060| 63 68 61 72 61 63 74 65 | 72 73 2e 0d 20 20 20 20 |characte|rs.. |
|00001070| 20 2a 20 54 68 65 20 72 | 65 74 75 72 6e 65 64 20 | * The r|eturned |
|00001080| 73 74 72 69 6e 67 20 69 | 73 20 66 6f 72 20 75 73 |string i|s for us|
|00001090| 65 72 20 64 69 73 70 6c | 61 79 20 6f 6e 6c 79 2e |er displ|ay only.|
|000010a0| 20 49 66 20 79 6f 75 20 | 72 65 6c 79 20 6f 6e 20 | If you |rely on |
|000010b0| 74 68 65 0d 20 20 20 20 | 20 2a 20 65 78 61 63 74 |the. | * exact|
|000010c0| 20 66 6f 72 6d 61 74 20 | 6f 66 20 69 74 2c 20 79 | format |of it, y|
|000010d0| 6f 75 20 77 69 6c 6c 20 | 63 6f 6e 66 6c 69 63 74 |ou will |conflict|
|000010e0| 20 77 69 74 68 20 61 6e | 79 20 66 75 74 75 72 65 | with an|y future|
|000010f0| 20 49 43 0d 20 20 20 20 | 20 2a 20 69 6d 70 6c 65 | IC. | * imple|
|00001100| 6d 65 6e 74 61 74 69 6f | 6e 20 74 68 61 74 20 64 |mentatio|n that d|
|00001110| 6f 65 73 6e 27 74 20 75 | 73 65 20 65 78 70 6c 69 |oesn't u|se expli|
|00001120| 63 69 74 20 70 72 65 66 | 65 72 65 6e 63 65 20 66 |cit pref|erence f|
|00001130| 69 6c 65 73 2e 0d 20 20 | 20 20 20 2a 29 0d 20 20 |iles.. | *). |
|00001140| 0d 20 20 66 75 6e 63 74 | 69 6f 6e 20 49 43 47 65 |. funct|ion ICGe|
|00001150| 74 43 6f 6e 66 69 67 52 | 65 66 65 72 65 6e 63 65 |tConfigR|eference|
|00001160| 28 69 6e 73 74 20 3a 20 | 49 43 49 6e 73 74 61 6e |(inst : |ICInstan|
|00001170| 63 65 3b 20 72 65 66 20 | 3a 20 49 43 43 6f 6e 66 |ce; ref |: ICConf|
|00001180| 69 67 52 65 66 48 61 6e | 64 6c 65 29 20 3a 20 49 |igRefHan|dle) : I|
|00001190| 43 45 72 72 6f 72 3b 0d | 20 20 20 20 28 2a 20 52 |CError;.| (* R|
|000011a0| 65 71 75 69 72 65 73 20 | 49 43 20 31 2e 32 2e 0d |equires |IC 1.2..|
|000011b0| 20 20 20 20 20 2a 20 59 | 6f 75 20 6d 75 73 74 20 | * Y|ou must |
|000011c0| 73 70 65 63 69 66 79 20 | 61 20 63 6f 6e 66 69 67 |specify |a config|
|000011d0| 75 72 61 74 69 6f 6e 20 | 62 65 66 6f 72 65 20 63 |uration |before c|
|000011e0| 61 6c 6c 69 6e 67 20 74 | 68 69 73 20 72 6f 75 74 |alling t|his rout|
|000011f0| 69 6e 65 2e 0d 20 20 20 | 20 20 2a 20 52 65 74 75 |ine.. | * Retu|
|00001200| 72 6e 73 20 61 20 73 65 | 6c 66 2d 63 6f 6e 74 61 |rns a se|lf-conta|
|00001210| 69 6e 65 64 20 72 65 66 | 65 72 65 6e 63 65 20 74 |ined ref|erence t|
|00001220| 6f 20 74 68 65 20 69 6e | 73 74 61 6e 63 65 27 73 |o the in|stance's|
|00001230| 20 63 75 72 72 65 6e 74 | 0d 20 20 20 20 20 2a 20 | current|. * |
|00001240| 63 6f 6e 66 69 67 75 72 | 61 74 69 6f 6e 2e 0d 20 |configur|ation.. |
|00001250| 20 20 20 20 2a 20 72 65 | 66 20 6d 75 73 74 20 62 | * re|f must b|
|00001260| 65 20 61 20 76 61 6c 69 | 64 20 6e 6f 6e 2d 6e 69 |e a vali|d non-ni|
|00001270| 6c 20 68 61 6e 64 6c 65 | 20 61 6e 64 20 69 74 20 |l handle| and it |
|00001280| 77 69 6c 6c 20 62 65 20 | 72 65 73 69 7a 65 64 20 |will be |resized |
|00001290| 74 6f 20 66 69 74 20 74 | 68 65 0d 20 20 20 20 20 |to fit t|he. |
|000012a0| 2a 20 72 65 73 75 6c 74 | 69 6e 67 20 64 61 74 61 |* result|ing data|
|000012b0| 2e 0d 20 20 20 20 20 2a | 29 0d 20 20 0d 20 20 66 |.. *|). . f|
|000012c0| 75 6e 63 74 69 6f 6e 20 | 49 43 53 65 74 43 6f 6e |unction |ICSetCon|
|000012d0| 66 69 67 52 65 66 65 72 | 65 6e 63 65 28 69 6e 73 |figRefer|ence(ins|
|000012e0| 74 20 3a 20 49 43 49 6e | 73 74 61 6e 63 65 3b 20 |t : ICIn|stance; |
|000012f0| 72 65 66 20 3a 20 49 43 | 43 6f 6e 66 69 67 52 65 |ref : IC|ConfigRe|
|00001300| 66 48 61 6e 64 6c 65 3b | 20 66 6c 61 67 73 20 3a |fHandle;| flags :|
|00001310| 20 6c 6f 6e 67 69 6e 74 | 29 20 3a 20 49 43 45 72 | longint|) : ICEr|
|00001320| 72 6f 72 3b 0d 20 20 20 | 20 28 2a 20 52 65 71 75 |ror;. | (* Requ|
|00001330| 69 72 65 73 20 49 43 20 | 31 2e 32 2e 0d 20 20 20 |ires IC |1.2.. |
|00001340| 20 20 2a 20 49 74 20 69 | 73 20 69 6c 6c 65 67 61 | * It i|s illega|
|00001350| 6c 20 74 6f 20 63 61 6c | 6c 20 74 68 69 73 20 72 |l to cal|l this r|
|00001360| 6f 75 74 69 6e 65 20 69 | 6e 73 69 64 65 20 61 20 |outine i|nside a |
|00001370| 49 43 42 65 67 69 6e 2f | 45 6e 64 20 70 61 69 72 |ICBegin/|End pair|
|00001380| 2e 0d 20 20 20 20 20 2a | 20 52 65 63 6f 6e 66 69 |.. *| Reconfi|
|00001390| 67 75 72 65 73 20 74 68 | 65 20 69 6e 73 74 61 6e |gures th|e instan|
|000013a0| 63 65 20 75 73 69 6e 67 | 20 61 20 63 6f 6e 66 69 |ce using| a confi|
|000013b0| 67 75 72 61 74 69 6f 6e | 20 72 65 66 65 72 65 6e |guration| referen|
|000013c0| 63 65 20 74 68 61 74 20 | 77 61 73 0d 20 20 20 20 |ce that |was. |
|000013d0| 20 2a 20 67 6f 74 20 75 | 73 69 6e 67 20 49 43 47 | * got u|sing ICG|
|000013e0| 65 74 43 6f 6e 66 69 67 | 52 65 66 65 72 65 6e 63 |etConfig|Referenc|
|000013f0| 65 20 72 65 66 65 72 65 | 6e 63 65 2e 20 53 65 74 |e refere|nce. Set|
|00001400| 20 74 68 65 0d 20 20 20 | 20 20 2a 20 69 63 4e 6f | the. | * icNo|
|00001410| 55 73 65 72 49 6e 74 65 | 72 61 63 74 69 6f 6e 5f |UserInte|raction_|
|00001420| 62 69 74 20 69 6e 20 66 | 6c 61 67 73 20 69 66 20 |bit in f|lags if |
|00001430| 79 6f 75 20 72 65 71 75 | 69 72 65 20 74 68 61 74 |you requ|ire that|
|00001440| 20 74 68 69 73 20 72 6f | 75 74 69 6e 65 0d 20 20 | this ro|utine. |
|00001450| 20 20 20 2a 20 6e 6f 74 | 20 70 72 65 73 65 6e 74 | * not| present|
|00001460| 20 61 20 6d 6f 64 61 6c | 20 64 69 61 6c 6f 67 2e | a modal| dialog.|
|00001470| 20 4f 74 68 65 72 20 66 | 6c 61 67 20 62 69 74 73 | Other f|lag bits|
|00001480| 20 61 72 65 20 72 65 73 | 65 72 76 65 64 20 61 6e | are res|erved an|
|00001490| 64 20 73 68 6f 75 6c 64 | 0d 20 20 20 20 20 2a 20 |d should|. * |
|000014a0| 62 65 20 73 65 74 20 74 | 6f 20 7a 65 72 6f 2e 0d |be set t|o zero..|
|000014b0| 20 20 20 20 20 2a 20 72 | 65 66 20 6d 75 73 74 20 | * r|ef must |
|000014c0| 6e 6f 74 20 62 65 20 6e | 69 6c 2e 0d 20 20 20 20 |not be n|il.. |
|000014d0| 20 2a 29 0d 20 20 0d 20 | 20 66 75 6e 63 74 69 6f | *). . | functio|
|000014e0| 6e 20 49 43 53 70 65 63 | 69 66 79 43 6f 6e 66 69 |n ICSpec|ifyConfi|
|000014f0| 67 46 69 6c 65 28 69 6e | 73 74 20 3a 20 49 43 49 |gFile(in|st : ICI|
|00001500| 6e 73 74 61 6e 63 65 3b | 20 76 61 72 20 63 6f 6e |nstance;| var con|
|00001510| 66 69 67 20 3a 20 46 53 | 53 70 65 63 29 20 3a 20 |fig : FS|Spec) : |
|00001520| 49 43 45 72 72 6f 72 3b | 0d 20 20 20 20 28 2a 20 |ICError;|. (* |
|00001530| 49 74 20 69 73 20 69 6c | 6c 65 67 61 6c 20 74 6f |It is il|legal to|
|00001540| 20 63 61 6c 6c 20 74 68 | 69 73 20 72 6f 75 74 69 | call th|is routi|
|00001550| 6e 65 20 69 6e 73 69 64 | 65 20 61 20 49 43 42 65 |ne insid|e a ICBe|
|00001560| 67 69 6e 2f 45 6e 64 20 | 70 61 69 72 2e 0d 20 20 |gin/End |pair.. |
|00001570| 20 20 20 2a 20 46 6f 72 | 20 75 73 65 20 6f 6e 6c | * For| use onl|
|00001580| 79 20 62 79 20 74 68 65 | 20 49 43 20 61 70 70 6c |y by the| IC appl|
|00001590| 69 63 61 74 69 6f 6e 2e | 0d 20 20 20 20 20 2a 20 |ication.|. * |
|000015a0| 49 66 20 79 6f 75 20 63 | 61 6c 6c 20 74 68 69 73 |If you c|all this|
|000015b0| 20 72 6f 75 74 69 6e 65 | 20 79 6f 75 72 73 65 6c | routine| yoursel|
|000015c0| 66 2c 20 79 6f 75 20 77 | 69 6c 6c 20 63 6f 6e 66 |f, you w|ill conf|
|000015d0| 6c 69 63 74 20 77 69 74 | 68 20 61 6e 79 0d 20 20 |lict wit|h any. |
|000015e0| 20 20 20 2a 20 66 75 74 | 75 72 65 20 49 43 20 69 | * fut|ure IC i|
|000015f0| 6d 70 6c 65 6d 65 6e 74 | 61 74 69 6f 6e 20 74 68 |mplement|ation th|
|00001600| 61 74 20 64 6f 65 73 6e | 27 74 20 75 73 65 20 65 |at doesn|'t use e|
|00001610| 78 70 6c 69 63 69 74 20 | 70 72 65 66 65 72 65 6e |xplicit |preferen|
|00001620| 63 65 20 66 69 6c 65 73 | 2e 0d 20 20 20 20 20 2a |ce files|.. *|
|00001630| 29 0d 20 20 0d 20 20 28 | 2a 20 2a 2a 2a 2a 2a 20 |). . (|* ***** |
|00001640| 47 65 74 74 69 6e 67 20 | 49 6e 66 6f 72 6d 61 74 |Getting |Informat|
|00001650| 69 6f 6e 20 2a 2a 2a 2a | 2a 20 2a 29 0d 20 20 0d |ion ****|* *). .|
|00001660| 20 20 66 75 6e 63 74 69 | 6f 6e 20 49 43 47 65 74 | functi|on ICGet|
|00001670| 53 65 65 64 28 69 6e 73 | 74 20 3a 20 49 43 49 6e |Seed(ins|t : ICIn|
|00001680| 73 74 61 6e 63 65 3b 20 | 76 61 72 20 73 65 65 64 |stance; |var seed|
|00001690| 20 3a 20 6c 6f 6e 67 69 | 6e 74 29 20 3a 20 49 43 | : longi|nt) : IC|
|000016a0| 45 72 72 6f 72 3b 0d 20 | 20 20 20 28 2a 20 59 6f |Error;. | (* Yo|
|000016b0| 75 20 64 6f 20 6e 6f 74 | 20 68 61 76 65 20 74 6f |u do not| have to|
|000016c0| 20 73 70 65 63 69 66 79 | 20 61 20 63 6f 6e 66 69 | specify| a confi|
|000016d0| 67 75 72 61 74 69 6f 6e | 20 62 65 66 6f 72 65 20 |guration| before |
|000016e0| 63 61 6c 6c 69 6e 67 20 | 74 68 69 73 20 72 6f 75 |calling |this rou|
|000016f0| 74 69 6e 65 2e 0d 20 20 | 20 20 20 2a 20 59 6f 75 |tine.. | * You|
|00001700| 20 64 6f 20 6e 6f 74 20 | 68 61 76 65 20 74 6f 20 | do not |have to |
|00001710| 62 65 20 69 6e 73 69 64 | 65 20 61 6e 20 49 43 42 |be insid|e an ICB|
|00001720| 65 67 69 6e 2f 45 6e 64 | 20 70 61 69 72 20 74 6f |egin/End| pair to|
|00001730| 20 63 61 6c 6c 20 74 68 | 69 73 20 72 6f 75 74 69 | call th|is routi|
|00001740| 6e 65 2e 0d 20 20 20 20 | 20 2a 20 52 65 74 75 72 |ne.. | * Retur|
|00001750| 6e 73 20 74 68 65 20 63 | 75 72 72 65 6e 74 20 73 |ns the c|urrent s|
|00001760| 65 65 64 20 66 6f 72 20 | 74 68 65 20 49 43 20 70 |eed for |the IC p|
|00001770| 72 65 66 73 20 64 61 74 | 61 62 61 73 65 2e 0d 20 |refs dat|abase.. |
|00001780| 20 20 20 20 2a 20 54 68 | 69 73 20 73 65 65 64 20 | * Th|is seed |
|00001790| 63 68 61 6e 67 65 73 20 | 65 61 63 68 20 74 69 6d |changes |each tim|
|000017a0| 65 20 61 20 6e 6f 6e 2d | 76 6f 6c 61 74 69 6c 65 |e a non-|volatile|
|000017b0| 20 70 72 65 66 65 72 65 | 6e 63 65 20 69 73 20 63 | prefere|nce is c|
|000017c0| 68 61 6e 67 65 64 2e 0d | 20 20 20 20 20 2a 20 59 |hanged..| * Y|
|000017d0| 6f 75 20 63 61 6e 20 70 | 6f 6c 6c 20 74 68 69 73 |ou can p|oll this|
|000017e0| 20 74 6f 20 64 65 74 65 | 72 6d 69 6e 65 20 69 66 | to dete|rmine if|
|000017f0| 20 61 6e 79 20 63 61 63 | 68 65 64 20 70 72 65 66 | any cac|hed pref|
|00001800| 65 72 65 6e 63 65 73 20 | 63 68 61 6e 67 65 2e 0d |erences |change..|
|00001810| 20 20 20 20 20 2a 29 0d | 20 20 0d 20 20 66 75 6e | *).| . fun|
|00001820| 63 74 69 6f 6e 20 49 43 | 47 65 74 50 65 72 6d 28 |ction IC|GetPerm(|
|00001830| 69 6e 73 74 20 3a 20 49 | 43 49 6e 73 74 61 6e 63 |inst : I|CInstanc|
|00001840| 65 3b 20 76 61 72 20 70 | 65 72 6d 20 3a 20 49 43 |e; var p|erm : IC|
|00001850| 50 65 72 6d 29 20 3a 20 | 49 43 45 72 72 6f 72 3b |Perm) : |ICError;|
|00001860| 0d 20 20 20 20 28 2a 20 | 59 6f 75 20 64 6f 20 6e |. (* |You do n|
|00001870| 6f 74 20 68 61 76 65 20 | 74 6f 20 73 70 65 63 69 |ot have |to speci|
|00001880| 66 79 20 61 20 63 6f 6e | 66 69 67 75 72 61 74 69 |fy a con|figurati|
|00001890| 6f 6e 20 62 65 66 6f 72 | 65 20 63 61 6c 6c 69 6e |on befor|e callin|
|000018a0| 67 20 74 68 69 73 20 72 | 6f 75 74 69 6e 65 2e 0d |g this r|outine..|
|000018b0| 20 20 20 20 20 2a 20 52 | 65 74 75 72 6e 73 20 74 | * R|eturns t|
|000018c0| 68 65 20 61 63 63 65 73 | 73 20 70 65 72 6d 69 73 |he acces|s permis|
|000018d0| 73 69 6f 6e 73 20 63 75 | 72 72 65 6e 74 6c 79 20 |sions cu|rrently |
|000018e0| 61 73 73 6f 63 69 61 74 | 65 64 20 77 69 74 68 20 |associat|ed with |
|000018f0| 74 68 69 73 20 69 6e 73 | 74 61 6e 63 65 2e 0d 20 |this ins|tance.. |
|00001900| 20 20 20 20 2a 20 57 68 | 69 6c 65 20 61 70 70 6c | * Wh|ile appl|
|00001910| 69 63 61 74 69 6f 6e 73 | 20 6e 6f 72 6d 61 6c 6c |ications| normall|
|00001920| 79 20 6b 6e 6f 77 20 77 | 68 61 74 20 70 65 72 6d |y know w|hat perm|
|00001930| 69 73 73 69 6f 6e 73 20 | 74 68 65 79 20 68 61 76 |issions |they hav|
|00001940| 65 2c 0d 20 20 20 20 20 | 2a 20 74 68 69 73 20 72 |e,. |* this r|
|00001950| 6f 75 74 69 6e 65 20 69 | 73 20 64 65 73 69 67 6e |outine i|s design|
|00001960| 65 64 20 66 6f 72 20 75 | 73 65 20 62 79 20 6f 76 |ed for u|se by ov|
|00001970| 65 72 72 69 64 65 20 63 | 6f 6d 70 6f 6e 65 6e 74 |erride c|omponent|
|00001980| 73 2e 0d 20 20 20 20 20 | 2a 29 0d 20 20 0d 20 20 |s.. |*). . |
|00001990| 66 75 6e 63 74 69 6f 6e | 20 49 43 44 65 66 61 75 |function| ICDefau|
|000019a0| 6c 74 46 69 6c 65 4e 61 | 6d 65 28 69 6e 73 74 20 |ltFileNa|me(inst |
|000019b0| 3a 20 49 43 49 6e 73 74 | 61 6e 63 65 3b 20 76 61 |: ICInst|ance; va|
|000019c0| 72 20 6e 61 6d 65 20 3a | 20 53 74 72 36 33 29 20 |r name :| Str63) |
|000019d0| 3a 20 49 43 45 72 72 6f | 72 3b 0d 20 20 20 20 28 |: ICErro|r;. (|
|000019e0| 2a 20 59 6f 75 20 64 6f | 20 6e 6f 74 20 68 61 76 |* You do| not hav|
|000019f0| 65 20 74 6f 20 73 70 65 | 63 69 66 79 20 61 20 63 |e to spe|cify a c|
|00001a00| 6f 6e 66 69 67 75 72 61 | 74 69 6f 6e 20 62 65 66 |onfigura|tion bef|
|00001a10| 6f 72 65 20 63 61 6c 6c | 69 6e 67 20 74 68 69 73 |ore call|ing this|
|00001a20| 20 72 6f 75 74 69 6e 65 | 2e 0d 20 20 20 20 20 2a | routine|.. *|
|00001a30| 20 59 6f 75 20 64 6f 20 | 6e 6f 74 20 68 61 76 65 | You do |not have|
|00001a40| 20 74 6f 20 62 65 20 69 | 6e 73 69 64 65 20 61 6e | to be i|nside an|
|00001a50| 20 49 43 42 65 67 69 6e | 2f 45 6e 64 20 70 61 69 | ICBegin|/End pai|
|00001a60| 72 20 74 6f 20 63 61 6c | 6c 20 74 68 69 73 20 72 |r to cal|l this r|
|00001a70| 6f 75 74 69 6e 65 2e 0d | 20 20 20 20 20 2a 20 52 |outine..| * R|
|00001a80| 65 74 75 72 6e 73 20 74 | 68 65 20 64 65 66 61 75 |eturns t|he defau|
|00001a90| 6c 74 20 66 69 6c 65 20 | 6e 61 6d 65 20 66 6f 72 |lt file |name for|
|00001aa0| 20 49 43 20 70 72 65 66 | 65 72 65 6e 63 65 20 66 | IC pref|erence f|
|00001ab0| 69 6c 65 73 2e 0d 20 20 | 20 20 20 2a 20 41 70 70 |iles.. | * App|
|00001ac0| 6c 69 63 61 74 69 6f 6e | 73 20 73 68 6f 75 6c 64 |lication|s should|
|00001ad0| 20 6e 65 76 65 72 20 6e | 65 65 64 20 74 6f 20 63 | never n|eed to c|
|00001ae0| 61 6c 6c 20 74 68 69 73 | 20 72 6f 75 74 69 6e 65 |all this| routine|
|00001af0| 2e 0d 20 20 20 20 20 2a | 20 49 66 20 79 6f 75 20 |.. *| If you |
|00001b00| 72 65 6c 79 20 6f 6e 20 | 69 6e 66 6f 72 6d 61 74 |rely on |informat|
|00001b10| 69 6f 6e 20 72 65 74 75 | 72 6e 65 64 20 62 79 20 |ion retu|rned by |
|00001b20| 74 68 69 73 20 72 6f 75 | 74 69 6e 65 20 79 6f 75 |this rou|tine you|
|00001b30| 72 73 65 6c 66 2c 0d 20 | 20 20 20 20 2a 20 79 6f |rself,. | * yo|
|00001b40| 75 20 6d 61 79 20 63 6f | 6e 66 6c 69 63 74 20 77 |u may co|nflict w|
|00001b50| 69 74 68 20 61 6e 79 20 | 66 75 74 75 72 65 20 49 |ith any |future I|
|00001b60| 43 20 69 6d 70 6c 65 6d | 65 6e 74 61 74 69 6f 6e |C implem|entation|
|00001b70| 20 74 68 61 74 20 64 6f | 65 73 6e 27 74 20 75 73 | that do|esn't us|
|00001b80| 65 0d 20 20 20 20 20 2a | 20 65 78 70 6c 69 63 69 |e. *| explici|
|00001b90| 74 20 70 72 65 66 65 72 | 65 6e 63 65 20 66 69 6c |t prefer|ence fil|
|00001ba0| 65 73 2e 0d 20 20 20 20 | 20 2a 20 54 68 65 20 63 |es.. | * The c|
|00001bb0| 6f 6d 70 6f 6e 65 6e 74 | 20 63 61 6c 6c 73 20 74 |omponent| calls t|
|00001bc0| 68 69 73 20 72 6f 75 74 | 69 6e 65 20 74 6f 20 73 |his rout|ine to s|
|00001bd0| 65 74 20 75 70 20 74 68 | 65 20 64 65 66 61 75 6c |et up th|e defaul|
|00001be0| 74 20 49 43 20 66 69 6c | 65 20 6e 61 6d 65 2e 0d |t IC fil|e name..|
|00001bf0| 20 20 20 20 20 2a 20 54 | 68 69 73 20 61 6c 6c 6f | * T|his allo|
|00001c00| 77 73 20 74 68 69 73 20 | 6f 70 65 72 61 74 69 6f |ws this |operatio|
|00001c10| 6e 20 74 6f 20 62 65 20 | 69 6e 74 65 72 63 65 70 |n to be |intercep|
|00001c20| 74 65 64 20 62 79 20 61 | 20 63 6f 6d 70 6f 6e 65 |ted by a| compone|
|00001c30| 6e 74 20 74 68 61 74 20 | 68 61 73 0d 20 20 20 20 |nt that |has. |
|00001c40| 20 2a 20 63 61 70 74 75 | 72 65 64 20 75 73 2e 20 | * captu|red us. |
|00001c50| 49 74 20 63 75 72 72 65 | 6e 74 6c 79 20 67 65 74 |It curre|ntly get|
|00001c60| 73 20 69 74 20 66 72 6f | 6d 20 74 68 65 20 63 6f |s it fro|m the co|
|00001c70| 6d 70 6f 6e 65 6e 74 20 | 72 65 73 6f 75 72 63 65 |mponent |resource|
|00001c80| 20 66 69 6c 65 2e 0d 20 | 20 20 20 20 2a 20 54 68 | file.. | * Th|
|00001c90| 65 20 67 6c 75 65 20 76 | 65 72 73 69 6f 6e 20 69 |e glue v|ersion i|
|00001ca0| 73 20 68 61 72 64 77 69 | 72 65 64 20 74 6f 20 22 |s hardwi|red to "|
|00001cb0| 49 6e 74 65 72 6e 65 74 | 20 50 72 65 66 65 72 65 |Internet| Prefere|
|00001cc0| 6e 63 65 73 22 2e 0d 20 | 20 20 20 20 2a 29 0d 20 |nces".. | *). |
|00001cd0| 20 0d 20 20 66 75 6e 63 | 74 69 6f 6e 20 49 43 47 | . func|tion ICG|
|00001ce0| 65 74 43 6f 6d 70 6f 6e | 65 6e 74 49 6e 73 74 61 |etCompon|entInsta|
|00001cf0| 6e 63 65 28 69 6e 73 74 | 20 3a 20 49 43 49 6e 73 |nce(inst| : ICIns|
|00001d00| 74 61 6e 63 65 3b 20 76 | 61 72 20 63 6f 6d 70 6f |tance; v|ar compo|
|00001d10| 6e 65 6e 74 5f 69 6e 73 | 74 20 3a 20 75 6e 69 76 |nent_ins|t : univ|
|00001d20| 20 50 74 72 29 20 3a 20 | 49 43 45 72 72 6f 72 3b | Ptr) : |ICError;|
|00001d30| 0d 20 20 20 20 28 2a 20 | 52 65 71 75 69 72 65 73 |. (* |Requires|
|00001d40| 20 49 43 20 31 2e 32 2e | 0d 20 20 20 20 20 2a 20 | IC 1.2.|. * |
|00001d50| 59 6f 75 20 64 6f 20 6e | 6f 74 20 68 61 76 65 20 |You do n|ot have |
|00001d60| 74 6f 20 73 70 65 63 69 | 66 79 20 61 20 63 6f 6e |to speci|fy a con|
|00001d70| 66 69 67 75 72 61 74 69 | 6f 6e 20 62 65 66 6f 72 |figurati|on befor|
|00001d80| 65 20 63 61 6c 6c 69 6e | 67 20 74 68 69 73 20 72 |e callin|g this r|
|00001d90| 6f 75 74 69 6e 65 2e 0d | 20 20 20 20 20 2a 20 59 |outine..| * Y|
|00001da0| 6f 75 20 64 6f 20 6e 6f | 74 20 68 61 76 65 20 74 |ou do no|t have t|
|00001db0| 6f 20 62 65 20 69 6e 73 | 69 64 65 20 61 6e 20 49 |o be ins|ide an I|
|00001dc0| 43 42 65 67 69 6e 2f 45 | 6e 64 20 70 61 69 72 20 |CBegin/E|nd pair |
|00001dd0| 74 6f 20 63 61 6c 6c 20 | 74 68 69 73 20 72 6f 75 |to call |this rou|
|00001de0| 74 69 6e 65 2e 0d 20 20 | 20 20 20 2a 20 52 65 74 |tine.. | * Ret|
|00001df0| 75 72 6e 73 20 6e 6f 45 | 72 72 20 61 6e 64 20 74 |urns noE|rr and t|
|00001e00| 68 65 20 63 6f 6e 6e 65 | 63 74 69 6f 6e 20 74 6f |he conne|ction to|
|00001e10| 20 74 68 65 20 49 43 20 | 63 6f 6d 70 6f 6e 65 6e | the IC |componen|
|00001e20| 74 2c 0d 20 20 20 20 20 | 2a 20 69 66 20 77 65 27 |t,. |* if we'|
|00001e30| 72 65 20 75 73 69 6e 67 | 20 74 68 65 20 63 6f 6d |re using| the com|
|00001e40| 70 6f 6e 65 6e 74 2e 0d | 20 20 20 20 20 2a 20 52 |ponent..| * R|
|00001e50| 65 74 75 72 6e 73 20 62 | 61 64 43 6f 6d 70 6f 6e |eturns b|adCompon|
|00001e60| 65 6e 49 6e 73 74 61 6e | 63 65 20 61 6e 64 20 6e |enInstan|ce and n|
|00001e70| 69 6c 20 69 66 20 77 65 | 27 72 65 20 6f 70 65 72 |il if we|'re oper|
|00001e80| 61 74 69 6e 67 20 77 69 | 74 68 20 67 6c 75 65 2e |ating wi|th glue.|
|00001e90| 0d 20 20 20 20 20 2a 20 | 54 68 65 20 63 6f 6d 70 |. * |The comp|
|00001ea0| 6f 6e 65 6e 74 5f 69 6e | 73 74 20 70 61 72 61 6d |onent_in|st param|
|00001eb0| 65 74 65 72 20 69 73 20 | 61 20 75 6e 69 76 65 72 |eter is |a univer|
|00001ec0| 73 61 6c 20 70 6f 69 6e | 74 65 72 20 74 6f 20 61 |sal poin|ter to a|
|00001ed0| 76 6f 69 64 0d 20 20 20 | 20 20 2a 20 75 73 20 68 |void. | * us h|
|00001ee0| 61 76 69 6e 67 20 74 6f | 20 69 6e 63 6c 75 64 65 |aving to| include|
|00001ef0| 20 43 6f 6d 70 6f 6e 65 | 6e 74 2e 5b 70 68 5d 20 | Compone|nt.[ph] |
|00001f00| 28 77 68 69 63 68 20 69 | 73 20 6e 6f 74 20 61 76 |(which i|s not av|
|00001f10| 61 69 6c 61 62 6c 65 20 | 75 6e 64 65 72 0d 20 20 |ailable |under. |
|00001f20| 20 20 20 2a 20 73 6f 6d | 65 20 64 65 76 65 6c 6f | * som|e develo|
|00001f30| 70 6d 65 6e 74 20 65 6e | 76 69 72 6f 6e 6d 65 6e |pment en|vironmen|
|00001f40| 74 73 29 20 69 6e 20 6f | 72 64 65 72 20 74 6f 20 |ts) in o|rder to |
|00001f50| 75 73 65 20 49 43 2e 0d | 20 20 20 20 20 2a 29 0d |use IC..| *).|
|00001f60| 20 20 0d 20 20 28 2a 20 | 2a 2a 2a 2a 2a 20 52 65 | . (* |***** Re|
|00001f70| 61 64 69 6e 67 20 61 6e | 64 20 57 72 69 74 69 6e |ading an|d Writin|
|00001f80| 67 20 50 72 65 66 65 72 | 65 6e 63 65 73 20 2a 2a |g Prefer|ences **|
|00001f90| 2a 2a 2a 20 2a 29 0d 20 | 20 0d 20 20 66 75 6e 63 |*** *). | . func|
|00001fa0| 74 69 6f 6e 20 49 43 42 | 65 67 69 6e 28 69 6e 73 |tion ICB|egin(ins|
|00001fb0| 74 20 3a 20 49 43 49 6e | 73 74 61 6e 63 65 3b 20 |t : ICIn|stance; |
|00001fc0| 70 65 72 6d 20 3a 20 49 | 43 50 65 72 6d 29 20 3a |perm : I|CPerm) :|
|00001fd0| 20 49 43 45 72 72 6f 72 | 3b 0d 20 20 20 20 28 2a | ICError|;. (*|
|00001fe0| 20 59 6f 75 20 6d 75 73 | 74 20 73 70 65 63 69 66 | You mus|t specif|
|00001ff0| 79 20 61 20 63 6f 6e 66 | 69 67 75 72 61 74 69 6f |y a conf|iguratio|
|00002000| 6e 20 62 65 66 6f 72 65 | 20 63 61 6c 6c 69 6e 67 |n before| calling|
|00002010| 20 74 68 69 73 20 72 6f | 75 74 69 6e 65 2e 0d 20 | this ro|utine.. |
|00002020| 20 20 20 20 2a 20 49 74 | 20 69 73 20 69 6c 6c 65 | * It| is ille|
|00002030| 67 61 6c 20 74 6f 20 63 | 61 6c 6c 20 74 68 69 73 |gal to c|all this|
|00002040| 20 72 6f 75 74 69 6e 65 | 20 69 6e 73 69 64 65 20 | routine| inside |
|00002050| 61 20 49 43 42 65 67 69 | 6e 2f 45 6e 64 20 70 61 |a ICBegi|n/End pa|
|00002060| 69 72 2e 0d 20 20 20 20 | 20 2a 20 53 74 61 72 74 |ir.. | * Start|
|00002070| 69 6e 67 20 72 65 61 64 | 69 6e 67 20 6f 72 20 77 |ing read|ing or w|
|00002080| 72 69 74 69 6e 67 20 6d | 75 6c 74 69 70 6c 65 20 |riting m|ultiple |
|00002090| 70 72 65 66 65 72 65 6e | 63 65 73 2e 0d 20 20 20 |preferen|ces.. |
|000020a0| 20 20 2a 20 41 20 63 61 | 6c 6c 20 74 6f 20 74 68 | * A ca|ll to th|
|000020b0| 69 73 20 6d 75 73 74 20 | 62 65 20 62 61 6c 61 6e |is must |be balan|
|000020c0| 63 65 64 20 62 79 20 61 | 20 63 61 6c 6c 20 74 6f |ced by a| call to|
|000020d0| 20 49 43 45 6e 64 2e 0d | 20 20 20 20 20 2a 20 44 | ICEnd..| * D|
|000020e0| 6f 20 6e 6f 74 20 63 61 | 6c 6c 20 57 61 69 74 4e |o not ca|ll WaitN|
|000020f0| 65 78 74 45 76 65 6e 74 | 20 62 65 74 77 65 65 6e |extEvent| between|
|00002100| 20 74 68 65 73 65 20 63 | 61 6c 6c 73 2e 0d 20 20 | these c|alls.. |
|00002110| 20 20 20 2a 20 54 68 65 | 20 70 65 72 6d 20 73 70 | * The| perm sp|
|00002120| 65 63 69 66 69 65 73 20 | 77 68 65 74 68 65 72 20 |ecifies |whether |
|00002130| 79 6f 75 20 69 6e 74 65 | 6e 64 20 74 6f 20 72 65 |you inte|nd to re|
|00002140| 61 64 20 6f 72 20 72 65 | 61 64 2f 77 72 69 74 65 |ad or re|ad/write|
|00002150| 2e 0d 20 20 20 20 20 2a | 20 4f 6e 6c 79 20 6f 6e |.. *| Only on|
|00002160| 65 20 77 72 69 74 65 72 | 20 69 73 20 61 6c 6c 6f |e writer| is allo|
|00002170| 77 65 64 20 70 65 72 20 | 69 6e 73 74 61 6e 63 65 |wed per |instance|
|00002180| 2e 0d 20 20 20 20 20 2a | 20 4e 6f 74 65 20 74 68 |.. *| Note th|
|00002190| 61 74 20 74 68 69 73 20 | 6d 61 79 20 6f 70 65 6e |at this |may open|
|000021a0| 20 72 65 73 6f 75 72 63 | 65 20 66 69 6c 65 73 20 | resourc|e files |
|000021b0| 74 68 61 74 20 61 72 65 | 20 6e 6f 74 20 63 6c 6f |that are| not clo|
|000021c0| 73 65 64 0d 20 20 20 20 | 20 2a 20 75 6e 74 69 6c |sed. | * until|
|000021d0| 20 79 6f 75 20 63 61 6c | 6c 20 49 43 45 6e 64 2e | you cal|l ICEnd.|
|000021e0| 0d 20 20 20 20 20 2a 29 | 0d 20 20 0d 20 20 66 75 |. *)|. . fu|
|000021f0| 6e 63 74 69 6f 6e 20 49 | 43 47 65 74 50 72 65 66 |nction I|CGetPref|
|00002200| 28 69 6e 73 74 20 3a 20 | 49 43 49 6e 73 74 61 6e |(inst : |ICInstan|
|00002210| 63 65 3b 20 6b 65 79 20 | 3a 20 53 74 72 32 35 35 |ce; key |: Str255|
|00002220| 3b 20 76 61 72 20 61 74 | 74 72 20 3a 20 49 43 41 |; var at|tr : ICA|
|00002230| 74 74 72 3b 20 62 75 66 | 20 3a 20 50 74 72 3b 20 |ttr; buf| : Ptr; |
|00002240| 76 61 72 20 73 69 7a 65 | 20 3a 20 6c 6f 6e 67 69 |var size| : longi|
|00002250| 6e 74 29 20 3a 20 49 43 | 45 72 72 6f 72 3b 0d 20 |nt) : IC|Error;. |
|00002260| 20 20 20 28 2a 20 59 6f | 75 20 6d 75 73 74 20 73 | (* Yo|u must s|
|00002270| 70 65 63 69 66 79 20 61 | 20 63 6f 6e 66 69 67 75 |pecify a| configu|
|00002280| 72 61 74 69 6f 6e 20 62 | 65 66 6f 72 65 20 63 61 |ration b|efore ca|
|00002290| 6c 6c 69 6e 67 20 74 68 | 69 73 20 72 6f 75 74 69 |lling th|is routi|
|000022a0| 6e 65 2e 0d 20 20 20 20 | 20 2a 20 49 66 20 79 6f |ne.. | * If yo|
|000022b0| 75 20 61 72 65 20 67 65 | 74 74 69 6e 67 20 6f 72 |u are ge|tting or|
|000022c0| 20 73 65 74 74 69 6e 67 | 20 6d 75 6c 74 69 70 6c | setting| multipl|
|000022d0| 65 20 70 72 65 66 65 72 | 65 6e 63 65 73 2c 20 79 |e prefer|ences, y|
|000022e0| 6f 75 20 73 68 6f 75 6c | 64 20 70 6c 61 63 65 0d |ou shoul|d place.|
|000022f0| 20 20 20 20 20 2a 20 74 | 68 65 73 65 20 63 61 6c | * t|hese cal|
|00002300| 6c 73 20 77 69 74 68 69 | 6e 20 61 6e 20 49 43 42 |ls withi|n an ICB|
|00002310| 65 67 69 6e 2f 49 43 45 | 6e 64 20 70 61 69 72 2e |egin/ICE|nd pair.|
|00002320| 0d 20 20 20 20 20 2a 20 | 49 66 20 79 6f 75 20 63 |. * |If you c|
|00002330| 61 6c 6c 20 74 68 69 73 | 20 72 6f 75 74 69 6e 65 |all this| routine|
|00002340| 20 6f 75 74 73 69 64 65 | 20 6f 66 20 73 75 63 68 | outside| of such|
|00002350| 20 61 20 70 61 69 72 2c | 20 69 74 20 69 6d 70 6c | a pair,| it impl|
|00002360| 69 63 69 74 6c 79 0d 20 | 20 20 20 20 2a 20 63 61 |icitly. | * ca|
|00002370| 6c 6c 73 20 49 43 42 65 | 67 69 6e 28 69 6e 73 74 |lls ICBe|gin(inst|
|00002380| 2c 20 69 63 52 65 61 64 | 4f 6e 6c 79 50 65 72 6d |, icRead|OnlyPerm|
|00002390| 29 2e 0d 20 20 20 20 20 | 2a 20 52 65 61 64 73 20 |).. |* Reads |
|000023a0| 74 68 65 20 70 72 65 66 | 65 72 65 6e 63 65 20 73 |the pref|erence s|
|000023b0| 70 65 63 69 66 69 65 64 | 20 62 79 20 6b 65 79 20 |pecified| by key |
|000023c0| 66 72 6f 6d 20 74 68 65 | 20 49 43 20 64 61 74 61 |from the| IC data|
|000023d0| 62 61 73 65 20 74 6f 20 | 74 68 65 0d 20 20 20 20 |base to |the. |
|000023e0| 20 2a 20 62 75 66 66 65 | 72 20 70 6f 69 6e 74 65 | * buffe|r pointe|
|000023f0| 64 20 74 6f 20 62 79 20 | 62 75 66 20 61 6e 64 20 |d to by |buf and |
|00002400| 73 69 7a 65 2e 0d 20 20 | 20 20 20 2a 20 6b 65 79 |size.. | * key|
|00002410| 20 6d 75 73 74 20 6e 6f | 74 20 62 65 20 74 68 65 | must no|t be the|
|00002420| 20 65 6d 70 74 79 20 73 | 74 72 69 6e 67 2e 0d 20 | empty s|tring.. |
|00002430| 20 20 20 20 2a 20 49 66 | 20 62 75 66 20 69 73 20 | * If| buf is |
|00002440| 6e 69 6c 20 74 68 65 6e | 20 6e 6f 20 64 61 74 61 |nil then| no data|
|00002450| 20 69 73 20 72 65 74 75 | 72 6e 65 64 2e 0d 20 20 | is retu|rned.. |
|00002460| 20 20 20 2a 20 73 69 7a | 65 20 6d 75 73 74 20 62 | * siz|e must b|
|00002470| 65 20 6e 6f 6e 2d 6e 65 | 67 61 74 69 76 65 2e 0d |e non-ne|gative..|
|00002480| 20 20 20 20 20 2a 20 61 | 74 74 72 20 61 6e 64 20 | * a|ttr and |
|00002490| 73 69 7a 65 20 61 72 65 | 20 61 6c 77 61 79 73 20 |size are| always |
|000024a0| 73 65 74 20 6f 6e 20 72 | 65 74 75 72 6e 2e 20 4f |set on r|eturn. O|
|000024b0| 6e 20 65 72 72 6f 72 73 | 20 28 65 78 63 65 70 74 |n errors| (except|
|000024c0| 20 69 63 54 72 75 6e 63 | 61 74 65 64 45 72 72 29 | icTrunc|atedErr)|
|000024d0| 0d 20 20 20 20 20 2a 20 | 61 74 74 72 20 69 73 20 |. * |attr is |
|000024e0| 73 65 74 20 74 6f 20 49 | 43 61 74 74 72 5f 6e 6f |set to I|Cattr_no|
|000024f0| 5f 63 68 61 6e 67 65 20 | 61 6e 64 20 73 69 7a 65 |_change |and size|
|00002500| 20 69 73 20 73 65 74 20 | 74 6f 20 30 2e 0d 20 20 | is set |to 0.. |
|00002510| 20 20 20 2a 20 73 69 7a | 65 20 69 73 20 74 68 65 | * siz|e is the|
|00002520| 20 61 63 74 75 61 6c 20 | 73 69 7a 65 20 6f 66 20 | actual |size of |
|00002530| 74 68 65 20 64 61 74 61 | 2e 0d 20 20 20 20 20 2a |the data|.. *|
|00002540| 20 61 74 74 72 20 69 73 | 20 73 65 74 20 74 6f 20 | attr is| set to |
|00002550| 74 68 65 20 61 74 74 72 | 69 62 75 74 65 73 20 61 |the attr|ibutes a|
|00002560| 73 73 6f 63 69 61 74 65 | 64 20 77 69 74 68 20 74 |ssociate|d with t|
|00002570| 68 65 20 70 72 65 66 65 | 72 65 6e 63 65 2e 0d 20 |he prefe|rence.. |
|00002580| 20 20 20 20 2a 20 49 66 | 20 74 68 69 73 20 72 6f | * If| this ro|
|00002590| 75 74 69 6e 65 20 72 65 | 74 75 72 6e 73 20 69 63 |utine re|turns ic|
|000025a0| 54 72 75 6e 63 61 74 65 | 64 45 72 72 20 74 68 65 |Truncate|dErr the|
|000025b0| 6e 20 74 68 65 20 6f 74 | 68 65 72 20 72 65 74 75 |n the ot|her retu|
|000025c0| 72 6e 65 64 0d 20 20 20 | 20 20 2a 20 76 61 6c 75 |rned. | * valu|
|000025d0| 65 73 20 61 72 65 20 76 | 61 6c 69 64 20 65 78 63 |es are v|alid exc|
|000025e0| 65 70 74 20 74 68 61 74 | 20 6f 6e 6c 79 20 74 68 |ept that| only th|
|000025f0| 65 20 66 69 72 73 74 20 | 73 69 7a 65 20 62 79 74 |e first |size byt|
|00002600| 65 73 20 68 61 76 65 20 | 62 65 65 6e 0d 20 20 20 |es have |been. |
|00002610| 20 20 2a 20 72 65 74 75 | 72 6e 2e 20 73 69 7a 65 | * retu|rn. size|
|00002620| 20 69 73 20 61 64 6a 75 | 73 74 65 64 20 74 6f 20 | is adju|sted to |
|00002630| 72 65 66 6c 65 63 74 20 | 74 68 65 20 74 72 75 65 |reflect |the true|
|00002640| 20 73 69 7a 65 20 6f 66 | 20 74 68 65 20 70 72 65 | size of| the pre|
|00002650| 66 65 72 65 6e 63 65 2e | 0d 20 20 20 20 20 2a 20 |ference.|. * |
|00002660| 52 65 74 75 72 6e 73 20 | 69 63 50 72 65 66 4e 6f |Returns |icPrefNo|
|00002670| 74 46 6f 75 6e 64 20 69 | 66 20 74 68 65 72 65 20 |tFound i|f there |
|00002680| 69 73 20 6e 6f 20 70 72 | 65 66 65 72 65 6e 63 65 |is no pr|eference|
|00002690| 20 66 6f 72 20 74 68 65 | 20 6b 65 79 2e 0d 20 20 | for the| key.. |
|000026a0| 20 20 20 2a 29 0d 20 20 | 0d 20 20 66 75 6e 63 74 | *). |. funct|
|000026b0| 69 6f 6e 20 49 43 53 65 | 74 50 72 65 66 28 69 6e |ion ICSe|tPref(in|
|000026c0| 73 74 20 3a 20 49 43 49 | 6e 73 74 61 6e 63 65 3b |st : ICI|nstance;|
|000026d0| 20 6b 65 79 20 3a 20 53 | 74 72 32 35 35 3b 20 61 | key : S|tr255; a|
|000026e0| 74 74 72 20 3a 20 49 43 | 41 74 74 72 3b 20 62 75 |ttr : IC|Attr; bu|
|000026f0| 66 20 3a 20 50 74 72 3b | 20 73 69 7a 65 20 3a 20 |f : Ptr;| size : |
|00002700| 6c 6f 6e 67 69 6e 74 29 | 20 3a 20 49 43 45 72 72 |longint)| : ICErr|
|00002710| 6f 72 3b 0d 20 20 20 20 | 28 2a 20 59 6f 75 20 6d |or;. |(* You m|
|00002720| 75 73 74 20 73 70 65 63 | 69 66 79 20 61 20 63 6f |ust spec|ify a co|
|00002730| 6e 66 69 67 75 72 61 74 | 69 6f 6e 20 62 65 66 6f |nfigurat|ion befo|
|00002740| 72 65 20 63 61 6c 6c 69 | 6e 67 20 74 68 69 73 20 |re calli|ng this |
|00002750| 72 6f 75 74 69 6e 65 2e | 0d 20 20 20 20 20 2a 20 |routine.|. * |
|00002760| 49 66 20 79 6f 75 20 61 | 72 65 20 67 65 74 74 69 |If you a|re getti|
|00002770| 6e 67 20 6f 72 20 73 65 | 74 74 69 6e 67 20 6d 75 |ng or se|tting mu|
|00002780| 6c 74 69 70 6c 65 20 70 | 72 65 66 65 72 65 6e 63 |ltiple p|referenc|
|00002790| 65 73 2c 20 79 6f 75 20 | 73 68 6f 75 6c 64 20 70 |es, you |should p|
|000027a0| 6c 61 63 65 0d 20 20 20 | 20 20 2a 20 74 68 65 73 |lace. | * thes|
|000027b0| 65 20 63 61 6c 6c 73 20 | 77 69 74 68 69 6e 20 61 |e calls |within a|
|000027c0| 6e 20 49 43 42 65 67 69 | 6e 2f 49 43 45 6e 64 20 |n ICBegi|n/ICEnd |
|000027d0| 70 61 69 72 2e 0d 20 20 | 20 20 20 2a 20 49 66 20 |pair.. | * If |
|000027e0| 79 6f 75 20 63 61 6c 6c | 20 74 68 69 73 20 72 6f |you call| this ro|
|000027f0| 75 74 69 6e 65 20 6f 75 | 74 73 69 64 65 20 6f 66 |utine ou|tside of|
|00002800| 20 73 75 63 68 20 61 20 | 70 61 69 72 2c 20 69 74 | such a |pair, it|
|00002810| 20 69 6d 70 6c 69 63 69 | 74 6c 79 0d 20 20 20 20 | implici|tly. |
|00002820| 20 2a 20 63 61 6c 6c 73 | 20 49 43 42 65 67 69 6e | * calls| ICBegin|
|00002830| 28 69 6e 73 74 2c 20 69 | 63 52 65 61 64 57 72 69 |(inst, i|cReadWri|
|00002840| 74 65 50 65 72 6d 29 2e | 0d 20 20 20 20 20 2a 20 |tePerm).|. * |
|00002850| 53 65 74 73 20 74 68 65 | 20 70 72 65 66 65 72 65 |Sets the| prefere|
|00002860| 6e 63 65 20 73 70 65 63 | 69 66 69 65 64 20 62 79 |nce spec|ified by|
|00002870| 20 6b 65 79 20 66 72 6f | 6d 20 74 68 65 20 49 43 | key fro|m the IC|
|00002880| 20 64 61 74 61 62 61 73 | 65 20 74 6f 20 74 68 65 | databas|e to the|
|00002890| 0d 20 20 20 20 20 2a 20 | 76 61 6c 75 65 20 70 6f |. * |value po|
|000028a0| 69 6e 74 65 64 20 74 6f | 20 62 79 20 62 75 66 20 |inted to| by buf |
|000028b0| 61 6e 64 20 73 69 7a 65 | 2e 0d 20 20 20 20 20 2a |and size|.. *|
|000028c0| 20 6b 65 79 20 6d 75 73 | 74 20 6e 6f 74 20 62 65 | key mus|t not be|
|000028d0| 20 74 68 65 20 65 6d 70 | 74 79 20 73 74 72 69 6e | the emp|ty strin|
|000028e0| 67 2e 0d 20 20 20 20 20 | 2a 20 73 69 7a 65 20 6d |g.. |* size m|
|000028f0| 75 73 74 20 62 65 20 6e | 6f 6e 2d 6e 65 67 61 74 |ust be n|on-negat|
|00002900| 69 76 65 2e 20 0d 20 20 | 20 20 20 2a 20 49 66 20 |ive. . | * If |
|00002910| 62 75 66 20 69 73 20 6e | 69 6c 20 74 68 65 6e 20 |buf is n|il then |
|00002920| 74 68 65 20 70 72 65 66 | 65 72 65 6e 63 65 20 76 |the pref|erence v|
|00002930| 61 6c 75 65 20 69 73 20 | 6e 6f 74 20 73 65 74 20 |alue is |not set |
|00002940| 61 6e 64 20 73 69 7a 65 | 20 69 73 20 69 67 6e 6f |and size| is igno|
|00002950| 72 65 64 2e 0d 20 20 20 | 20 20 2a 20 49 66 20 62 |red.. | * If b|
|00002960| 75 66 20 69 73 20 6e 6f | 74 20 6e 69 6c 20 74 68 |uf is no|t nil th|
|00002970| 65 6e 20 74 68 65 20 70 | 72 65 66 65 72 65 6e 63 |en the p|referenc|
|00002980| 65 20 76 61 6c 75 65 20 | 69 73 20 73 65 74 20 74 |e value |is set t|
|00002990| 6f 20 74 68 65 20 73 69 | 7a 65 0d 20 20 20 20 20 |o the si|ze. |
|000029a0| 2a 20 62 79 74 65 73 20 | 70 6f 69 6e 74 65 64 20 |* bytes |pointed |
|000029b0| 74 6f 20 62 79 20 62 75 | 66 2e 0d 20 20 20 20 20 |to by bu|f.. |
|000029c0| 2a 20 49 66 20 61 74 74 | 72 20 69 73 20 49 43 61 |* If att|r is ICa|
|000029d0| 74 74 72 5f 6e 6f 5f 63 | 68 61 6e 67 65 20 74 68 |ttr_no_c|hange th|
|000029e0| 65 6e 20 74 68 65 20 70 | 72 65 66 65 72 65 6e 63 |en the p|referenc|
|000029f0| 65 20 61 74 74 72 69 62 | 75 74 65 73 20 61 72 65 |e attrib|utes are|
|00002a00| 20 6e 6f 74 20 73 65 74 | 2e 0d 20 20 20 20 20 2a | not set|.. *|
|00002a10| 20 4f 74 68 65 72 77 69 | 73 65 20 74 68 65 20 70 | Otherwi|se the p|
|00002a20| 72 65 66 65 72 65 6e 63 | 65 20 61 74 74 72 69 62 |referenc|e attrib|
|00002a30| 75 74 65 73 20 61 72 65 | 20 73 65 74 20 74 6f 20 |utes are| set to |
|00002a40| 61 74 74 72 2e 0d 20 20 | 20 20 20 2a 20 52 65 74 |attr.. | * Ret|
|00002a50| 75 72 6e 73 20 69 63 50 | 65 72 6d 45 72 72 20 69 |urns icP|ermErr i|
|00002a60| 66 20 74 68 65 20 70 72 | 65 76 69 6f 75 73 20 49 |f the pr|evious I|
|00002a70| 43 42 65 67 69 6e 20 77 | 61 73 20 70 61 73 73 65 |CBegin w|as passe|
|00002a80| 64 20 69 63 52 65 61 64 | 4f 6e 6c 79 50 65 72 6d |d icRead|OnlyPerm|
|00002a90| 2e 0d 20 20 20 20 20 2a | 20 52 65 74 75 72 6e 73 |.. *| Returns|
|00002aa0| 20 69 63 50 65 72 6d 45 | 72 72 20 69 66 20 63 75 | icPermE|rr if cu|
|00002ab0| 72 72 65 6e 74 20 61 74 | 74 72 20 69 73 20 6c 6f |rrent at|tr is lo|
|00002ac0| 63 6b 65 64 2c 20 6e 65 | 77 20 61 74 74 72 20 69 |cked, ne|w attr i|
|00002ad0| 73 20 6c 6f 63 6b 65 64 | 20 61 6e 64 20 62 75 66 |s locked| and buf|
|00002ae0| 20 3c 3e 20 6e 69 6c 2e | 0d 20 20 20 20 20 2a 29 | <> nil.|. *)|
|00002af0| 0d 20 20 0d 20 20 66 75 | 6e 63 74 69 6f 6e 20 49 |. . fu|nction I|
|00002b00| 43 46 69 6e 64 50 72 65 | 66 48 61 6e 64 6c 65 28 |CFindPre|fHandle(|
|00002b10| 69 6e 73 74 20 3a 20 49 | 43 49 6e 73 74 61 6e 63 |inst : I|CInstanc|
|00002b20| 65 3b 20 6b 65 79 20 3a | 20 53 74 72 32 35 35 3b |e; key :| Str255;|
|00002b30| 20 76 61 72 20 61 74 74 | 72 20 3a 20 49 43 41 74 | var att|r : ICAt|
|00002b40| 74 72 3b 20 70 72 65 66 | 68 20 3a 20 48 61 6e 64 |tr; pref|h : Hand|
|00002b50| 6c 65 29 20 3a 20 49 43 | 45 72 72 6f 72 3b 0d 20 |le) : IC|Error;. |
|00002b60| 20 20 20 28 2a 20 52 65 | 71 75 69 72 65 73 20 49 | (* Re|quires I|
|00002b70| 43 20 31 2e 32 2e 0d 20 | 20 20 20 20 2a 20 59 6f |C 1.2.. | * Yo|
|00002b80| 75 20 6d 75 73 74 20 73 | 70 65 63 69 66 79 20 61 |u must s|pecify a|
|00002b90| 20 63 6f 6e 66 69 67 75 | 72 61 74 69 6f 6e 20 62 | configu|ration b|
|00002ba0| 65 66 6f 72 65 20 63 61 | 6c 6c 69 6e 67 20 74 68 |efore ca|lling th|
|00002bb0| 69 73 20 72 6f 75 74 69 | 6e 65 2e 0d 20 20 20 20 |is routi|ne.. |
|00002bc0| 20 2a 20 49 66 20 79 6f | 75 20 61 72 65 20 67 65 | * If yo|u are ge|
|00002bd0| 74 74 69 6e 67 20 6f 72 | 20 73 65 74 74 69 6e 67 |tting or| setting|
|00002be0| 20 6d 75 6c 74 69 70 6c | 65 20 70 72 65 66 65 72 | multipl|e prefer|
|00002bf0| 65 6e 63 65 73 2c 20 79 | 6f 75 20 73 68 6f 75 6c |ences, y|ou shoul|
|00002c00| 64 20 70 6c 61 63 65 0d | 20 20 20 20 20 2a 20 74 |d place.| * t|
|00002c10| 68 65 73 65 20 63 61 6c | 6c 73 20 77 69 74 68 69 |hese cal|ls withi|
|00002c20| 6e 20 61 6e 20 49 43 42 | 65 67 69 6e 2f 49 43 45 |n an ICB|egin/ICE|
|00002c30| 6e 64 20 70 61 69 72 2e | 0d 20 20 20 20 20 2a 20 |nd pair.|. * |
|00002c40| 49 66 20 79 6f 75 20 63 | 61 6c 6c 20 74 68 69 73 |If you c|all this|
|00002c50| 20 72 6f 75 74 69 6e 65 | 20 6f 75 74 73 69 64 65 | routine| outside|
|00002c60| 20 6f 66 20 73 75 63 68 | 20 61 20 70 61 69 72 2c | of such| a pair,|
|00002c70| 20 69 74 20 69 6d 70 6c | 69 63 69 74 6c 79 0d 20 | it impl|icitly. |
|00002c80| 20 20 20 20 2a 20 63 61 | 6c 6c 73 20 49 43 42 65 | * ca|lls ICBe|
|00002c90| 67 69 6e 28 69 6e 73 74 | 2c 20 69 63 52 65 61 64 |gin(inst|, icRead|
|00002ca0| 57 72 69 74 65 50 65 72 | 6d 29 2e 0d 20 20 20 20 |WritePer|m).. |
|00002cb0| 20 2a 20 54 68 69 73 20 | 72 6f 75 74 69 6e 65 20 | * This |routine |
|00002cc0| 65 66 66 65 63 74 69 76 | 65 6c 79 20 72 65 70 6c |effectiv|ely repl|
|00002cd0| 61 63 65 73 20 49 43 47 | 65 74 50 72 65 66 48 61 |aces ICG|etPrefHa|
|00002ce0| 6e 64 6c 65 2e 0d 20 20 | 20 20 20 2a 20 52 65 61 |ndle.. | * Rea|
|00002cf0| 64 73 20 74 68 65 20 70 | 72 65 66 65 72 65 6e 63 |ds the p|referenc|
|00002d00| 65 20 73 70 65 63 69 66 | 69 65 64 20 62 79 20 6b |e specif|ied by k|
|00002d10| 65 79 20 66 72 6f 6d 20 | 74 68 65 20 49 43 20 64 |ey from |the IC d|
|00002d20| 61 74 61 62 61 73 65 20 | 69 6e 74 6f 0d 20 20 20 |atabase |into. |
|00002d30| 20 20 2a 20 61 20 68 61 | 6e 64 6c 65 2c 20 70 72 | * a ha|ndle, pr|
|00002d40| 65 66 68 2e 0d 20 20 20 | 20 20 2a 20 6b 65 79 20 |efh.. | * key |
|00002d50| 6d 75 73 74 20 6e 6f 74 | 20 62 65 20 74 68 65 20 |must not| be the |
|00002d60| 65 6d 70 74 79 20 73 74 | 72 69 6e 67 2e 0d 20 20 |empty st|ring.. |
|00002d70| 20 20 20 2a 20 61 74 74 | 72 20 69 73 20 73 65 74 | * att|r is set|
|00002d80| 20 74 6f 20 74 68 65 20 | 61 74 74 72 69 62 75 74 | to the |attribut|
|00002d90| 65 73 20 61 73 73 6f 63 | 69 61 74 65 64 20 77 69 |es assoc|iated wi|
|00002da0| 74 68 20 74 68 65 20 70 | 72 65 66 65 72 65 6e 63 |th the p|referenc|
|00002db0| 65 2e 0d 20 20 20 20 20 | 2a 20 59 6f 75 20 6d 75 |e.. |* You mu|
|00002dc0| 73 74 20 73 65 74 20 70 | 72 65 66 68 20 74 6f 20 |st set p|refh to |
|00002dd0| 61 20 6e 6f 6e 2d 6e 69 | 6c 20 68 61 6e 64 6c 65 |a non-ni|l handle|
|00002de0| 20 62 65 66 6f 72 65 20 | 63 61 6c 6c 69 6e 67 20 | before |calling |
|00002df0| 74 68 69 73 20 72 6f 75 | 74 69 6e 65 2e 0d 20 20 |this rou|tine.. |
|00002e00| 20 20 20 2a 20 49 66 20 | 74 68 65 20 70 72 65 66 | * If |the pref|
|00002e10| 65 72 65 6e 63 65 20 64 | 6f 65 73 20 6e 6f 74 20 |erence d|oes not |
|00002e20| 65 78 69 73 74 2c 20 69 | 63 50 72 65 66 4e 6f 74 |exist, i|cPrefNot|
|00002e30| 46 6f 75 6e 64 45 72 72 | 20 69 73 20 72 65 74 75 |FoundErr| is retu|
|00002e40| 72 6e 65 64 2e 0d 20 20 | 20 20 20 2a 29 0d 20 20 |rned.. | *). |
|00002e50| 0d 20 20 66 75 6e 63 74 | 69 6f 6e 20 49 43 47 65 |. funct|ion ICGe|
|00002e60| 74 50 72 65 66 48 61 6e | 64 6c 65 28 69 6e 73 74 |tPrefHan|dle(inst|
|00002e70| 20 3a 20 49 43 49 6e 73 | 74 61 6e 63 65 3b 20 6b | : ICIns|tance; k|
|00002e80| 65 79 20 3a 20 53 74 72 | 32 35 35 3b 20 76 61 72 |ey : Str|255; var|
|00002e90| 20 61 74 74 72 20 3a 20 | 49 43 41 74 74 72 3b 20 | attr : |ICAttr; |
|00002ea0| 76 61 72 20 70 72 65 66 | 68 20 3a 20 48 61 6e 64 |var pref|h : Hand|
|00002eb0| 6c 65 29 20 3a 20 49 43 | 45 72 72 6f 72 3b 0d 20 |le) : IC|Error;. |
|00002ec0| 20 20 20 28 2a 20 52 65 | 71 75 69 72 65 73 20 49 | (* Re|quires I|
|00002ed0| 43 20 31 2e 31 2e 0d 20 | 20 20 20 20 2a 20 59 6f |C 1.1.. | * Yo|
|00002ee0| 75 20 6d 75 73 74 20 73 | 70 65 63 69 66 79 20 61 |u must s|pecify a|
|00002ef0| 20 63 6f 6e 66 69 67 75 | 72 61 74 69 6f 6e 20 62 | configu|ration b|
|00002f00| 65 66 6f 72 65 20 63 61 | 6c 6c 69 6e 67 20 74 68 |efore ca|lling th|
|00002f10| 69 73 20 72 6f 75 74 69 | 6e 65 2e 0d 20 20 20 20 |is routi|ne.. |
|00002f20| 20 2a 20 49 66 20 79 6f | 75 20 61 72 65 20 67 65 | * If yo|u are ge|
|00002f30| 74 74 69 6e 67 20 6f 72 | 20 73 65 74 74 69 6e 67 |tting or| setting|
|00002f40| 20 6d 75 6c 74 69 70 6c | 65 20 70 72 65 66 65 72 | multipl|e prefer|
|00002f50| 65 6e 63 65 73 2c 20 79 | 6f 75 20 73 68 6f 75 6c |ences, y|ou shoul|
|00002f60| 64 20 70 6c 61 63 65 0d | 20 20 20 20 20 2a 20 74 |d place.| * t|
|00002f70| 68 65 73 65 20 63 61 6c | 6c 73 20 77 69 74 68 69 |hese cal|ls withi|
|00002f80| 6e 20 61 6e 20 49 43 42 | 65 67 69 6e 2f 49 43 45 |n an ICB|egin/ICE|
|00002f90| 6e 64 20 70 61 69 72 2e | 0d 20 20 20 20 20 2a 20 |nd pair.|. * |
|00002fa0| 49 66 20 79 6f 75 20 63 | 61 6c 6c 20 74 68 69 73 |If you c|all this|
|00002fb0| 20 72 6f 75 74 69 6e 65 | 20 6f 75 74 73 69 64 65 | routine| outside|
|00002fc0| 20 6f 66 20 73 75 63 68 | 20 61 20 70 61 69 72 2c | of such| a pair,|
|00002fd0| 20 69 74 20 69 6d 70 6c | 69 63 69 74 6c 79 0d 20 | it impl|icitly. |
|00002fe0| 20 20 20 20 2a 20 63 61 | 6c 6c 73 20 49 43 42 65 | * ca|lls ICBe|
|00002ff0| 67 69 6e 28 69 6e 73 74 | 2c 20 69 63 52 65 61 64 |gin(inst|, icRead|
|00003000| 4f 6e 6c 79 50 65 72 6d | 29 2e 0d 20 20 20 20 20 |OnlyPerm|).. |
|00003010| 2a 20 54 68 69 73 20 72 | 6f 75 74 69 6e 65 20 69 |* This r|outine i|
|00003020| 73 20 6e 6f 77 20 6f 62 | 73 6f 6c 65 74 65 2e 20 |s now ob|solete. |
|00003030| 55 73 65 20 49 43 46 69 | 6e 64 50 72 65 66 48 61 |Use ICFi|ndPrefHa|
|00003040| 6e 64 6c 65 20 69 6e 73 | 74 65 61 64 2e 0d 20 20 |ndle ins|tead.. |
|00003050| 20 20 20 2a 20 52 65 61 | 64 73 20 74 68 65 20 70 | * Rea|ds the p|
|00003060| 72 65 66 65 72 65 6e 63 | 65 20 73 70 65 63 69 66 |referenc|e specif|
|00003070| 69 65 64 20 62 79 20 6b | 65 79 20 66 72 6f 6d 20 |ied by k|ey from |
|00003080| 74 68 65 20 49 43 20 64 | 61 74 61 62 61 73 65 20 |the IC d|atabase |
|00003090| 69 6e 74 6f 0d 20 20 20 | 20 20 2a 20 61 20 6e 65 |into. | * a ne|
|000030a0| 77 6c 79 20 63 72 65 61 | 74 65 64 20 68 61 6e 64 |wly crea|ted hand|
|000030b0| 6c 65 2c 20 70 72 65 66 | 68 2e 0d 20 20 20 20 20 |le, pref|h.. |
|000030c0| 2a 20 6b 65 79 20 6d 75 | 73 74 20 6e 6f 74 20 62 |* key mu|st not b|
|000030d0| 65 20 74 68 65 20 65 6d | 70 74 79 20 73 74 72 69 |e the em|pty stri|
|000030e0| 6e 67 2e 0d 20 20 20 20 | 20 2a 20 61 74 74 72 20 |ng.. | * attr |
|000030f0| 69 73 20 73 65 74 20 74 | 6f 20 74 68 65 20 61 74 |is set t|o the at|
|00003100| 74 72 69 62 75 74 65 73 | 20 61 73 73 6f 63 69 61 |tributes| associa|
|00003110| 74 65 64 20 77 69 74 68 | 20 74 68 65 20 70 72 65 |ted with| the pre|
|00003120| 66 65 72 65 6e 63 65 2e | 0d 20 20 20 20 20 2a 20 |ference.|. * |
|00003130| 54 68 65 20 69 6e 63 6f | 6d 69 6e 67 20 76 61 6c |The inco|ming val|
|00003140| 75 65 20 6f 66 20 70 72 | 65 66 68 20 69 73 20 69 |ue of pr|efh is i|
|00003150| 67 6e 6f 72 65 64 2e 0d | 20 20 20 20 20 2a 20 41 |gnored..| * A|
|00003160| 20 6e 65 77 20 68 61 6e | 64 6c 65 20 69 73 20 63 | new han|dle is c|
|00003170| 72 65 61 74 65 64 20 69 | 6e 20 74 68 65 20 63 75 |reated i|n the cu|
|00003180| 72 72 65 6e 74 20 68 65 | 61 70 20 61 6e 64 20 72 |rrent he|ap and r|
|00003190| 65 74 75 72 6e 65 64 20 | 69 6e 20 70 72 65 66 68 |eturned |in prefh|
|000031a0| 2e 0d 20 20 20 20 20 2a | 20 49 66 20 74 68 65 20 |.. *| If the |
|000031b0| 72 6f 75 74 69 6e 65 20 | 72 65 74 75 72 6e 73 20 |routine |returns |
|000031c0| 61 6e 20 65 72 72 6f 72 | 2c 20 70 72 65 66 68 20 |an error|, prefh |
|000031d0| 69 73 20 73 65 74 20 74 | 6f 20 6e 69 6c 2e 0d 20 |is set t|o nil.. |
|000031e0| 20 20 20 20 2a 20 49 66 | 20 74 68 65 20 70 72 65 | * If| the pre|
|000031f0| 66 65 72 65 6e 63 65 20 | 64 6f 65 73 20 6e 6f 74 |ference |does not|
|00003200| 20 65 78 69 73 74 2c 20 | 6e 6f 20 65 72 72 6f 72 | exist, |no error|
|00003210| 20 69 73 20 72 65 74 75 | 72 6e 65 64 20 61 6e 64 | is retu|rned and|
|00003220| 20 70 72 65 66 68 20 69 | 73 20 73 65 74 0d 20 20 | prefh i|s set. |
|00003230| 20 20 20 2a 20 74 6f 20 | 61 6e 20 65 6d 70 74 79 | * to |an empty|
|00003240| 20 68 61 6e 64 6c 65 2e | 0d 20 20 20 20 20 2a 29 | handle.|. *)|
|00003250| 0d 20 20 0d 20 20 66 75 | 6e 63 74 69 6f 6e 20 49 |. . fu|nction I|
|00003260| 43 53 65 74 50 72 65 66 | 48 61 6e 64 6c 65 28 69 |CSetPref|Handle(i|
|00003270| 6e 73 74 20 3a 20 49 43 | 49 6e 73 74 61 6e 63 65 |nst : IC|Instance|
|00003280| 3b 20 6b 65 79 20 3a 20 | 53 74 72 32 35 35 3b 20 |; key : |Str255; |
|00003290| 61 74 74 72 20 3a 20 49 | 43 41 74 74 72 3b 20 70 |attr : I|CAttr; p|
|000032a0| 72 65 66 68 20 3a 20 48 | 61 6e 64 6c 65 29 20 3a |refh : H|andle) :|
|000032b0| 20 49 43 45 72 72 6f 72 | 3b 0d 20 20 20 20 28 2a | ICError|;. (*|
|000032c0| 20 52 65 71 75 69 72 65 | 73 20 49 43 20 31 2e 31 | Require|s IC 1.1|
|000032d0| 2e 0d 20 20 20 20 20 2a | 20 59 6f 75 20 6d 75 73 |.. *| You mus|
|000032e0| 74 20 73 70 65 63 69 66 | 79 20 61 20 63 6f 6e 66 |t specif|y a conf|
|000032f0| 69 67 75 72 61 74 69 6f | 6e 20 62 65 66 6f 72 65 |iguratio|n before|
|00003300| 20 63 61 6c 6c 69 6e 67 | 20 74 68 69 73 20 72 6f | calling| this ro|
|00003310| 75 74 69 6e 65 2e 0d 20 | 20 20 20 20 2a 20 49 66 |utine.. | * If|
|00003320| 20 79 6f 75 20 61 72 65 | 20 67 65 74 74 69 6e 67 | you are| getting|
|00003330| 20 6f 72 20 73 65 74 74 | 69 6e 67 20 6d 75 6c 74 | or sett|ing mult|
|00003340| 69 70 6c 65 20 70 72 65 | 66 65 72 65 6e 63 65 73 |iple pre|ferences|
|00003350| 2c 20 79 6f 75 20 73 68 | 6f 75 6c 64 20 70 6c 61 |, you sh|ould pla|
|00003360| 63 65 0d 20 20 20 20 20 | 2a 20 74 68 65 73 65 20 |ce. |* these |
|00003370| 63 61 6c 6c 73 20 77 69 | 74 68 69 6e 20 61 6e 20 |calls wi|thin an |
|00003380| 49 43 42 65 67 69 6e 2f | 49 43 45 6e 64 20 70 61 |ICBegin/|ICEnd pa|
|00003390| 69 72 2e 0d 20 20 20 20 | 20 2a 20 49 66 20 79 6f |ir.. | * If yo|
|000033a0| 75 20 63 61 6c 6c 20 74 | 68 69 73 20 72 6f 75 74 |u call t|his rout|
|000033b0| 69 6e 65 20 6f 75 74 73 | 69 64 65 20 6f 66 20 73 |ine outs|ide of s|
|000033c0| 75 63 68 20 61 20 70 61 | 69 72 2c 20 69 74 20 69 |uch a pa|ir, it i|
|000033d0| 6d 70 6c 69 63 69 74 6c | 79 0d 20 20 20 20 20 2a |mplicitl|y. *|
|000033e0| 20 63 61 6c 6c 73 20 49 | 43 42 65 67 69 6e 28 69 | calls I|CBegin(i|
|000033f0| 6e 73 74 2c 20 69 63 52 | 65 61 64 57 72 69 74 65 |nst, icR|eadWrite|
|00003400| 50 65 72 6d 29 2e 0d 20 | 20 20 20 20 2a 20 53 65 |Perm).. | * Se|
|00003410| 74 73 20 74 68 65 20 70 | 72 65 66 65 72 65 6e 63 |ts the p|referenc|
|00003420| 65 20 73 70 65 63 69 66 | 69 65 64 20 62 79 20 6b |e specif|ied by k|
|00003430| 65 79 20 66 72 6f 6d 20 | 74 68 65 20 49 43 20 64 |ey from |the IC d|
|00003440| 61 74 61 62 61 73 65 20 | 74 6f 20 74 68 65 0d 20 |atabase |to the. |
|00003450| 20 20 20 20 2a 20 76 61 | 6c 75 65 20 63 6f 6e 74 | * va|lue cont|
|00003460| 61 69 6e 65 64 20 69 6e | 20 70 72 65 66 68 2e 0d |ained in| prefh..|
|00003470| 20 20 20 20 20 2a 20 6b | 65 79 20 6d 75 73 74 20 | * k|ey must |
|00003480| 6e 6f 74 20 62 65 20 74 | 68 65 20 65 6d 70 74 79 |not be t|he empty|
|00003490| 20 73 74 72 69 6e 67 2e | 0d 20 20 20 20 20 2a 20 | string.|. * |
|000034a0| 49 66 20 70 72 65 66 68 | 20 69 73 20 6e 69 6c 20 |If prefh| is nil |
|000034b0| 74 68 65 6e 20 74 68 65 | 20 70 72 65 66 65 72 65 |then the| prefere|
|000034c0| 6e 63 65 20 76 61 6c 75 | 65 20 69 73 20 6e 6f 74 |nce valu|e is not|
|000034d0| 20 73 65 74 2e 0d 20 20 | 20 20 20 2a 20 49 66 20 | set.. | * If |
|000034e0| 62 75 66 20 69 73 20 6e | 6f 74 20 6e 69 6c 20 74 |buf is n|ot nil t|
|000034f0| 68 65 6e 20 74 68 65 20 | 70 72 65 66 65 72 65 6e |hen the |preferen|
|00003500| 63 65 20 76 61 6c 75 65 | 20 69 73 20 73 65 74 20 |ce value| is set |
|00003510| 74 6f 20 74 68 65 20 64 | 61 74 61 0d 20 20 20 20 |to the d|ata. |
|00003520| 20 2a 20 63 6f 6e 74 61 | 69 6e 65 64 20 69 6e 20 | * conta|ined in |
|00003530| 69 74 2e 0d 20 20 20 20 | 20 2a 20 49 66 20 61 74 |it.. | * If at|
|00003540| 74 72 20 69 73 20 49 43 | 61 74 74 72 5f 6e 6f 5f |tr is IC|attr_no_|
|00003550| 63 68 61 6e 67 65 20 74 | 68 65 6e 20 74 68 65 20 |change t|hen the |
|00003560| 70 72 65 66 65 72 65 6e | 63 65 20 61 74 74 72 69 |preferen|ce attri|
|00003570| 62 75 74 65 73 20 61 72 | 65 20 6e 6f 74 20 73 65 |butes ar|e not se|
|00003580| 74 2e 0d 20 20 20 20 20 | 2a 20 4f 74 68 65 72 77 |t.. |* Otherw|
|00003590| 69 73 65 20 74 68 65 20 | 70 72 65 66 65 72 65 6e |ise the |preferen|
|000035a0| 63 65 20 61 74 74 72 69 | 62 75 74 65 73 20 61 72 |ce attri|butes ar|
|000035b0| 65 20 73 65 74 20 74 6f | 20 61 74 74 72 2e 0d 20 |e set to| attr.. |
|000035c0| 20 20 20 20 2a 20 52 65 | 74 75 72 6e 73 20 69 63 | * Re|turns ic|
|000035d0| 50 65 72 6d 45 72 72 20 | 69 66 20 74 68 65 20 70 |PermErr |if the p|
|000035e0| 72 65 76 69 6f 75 73 20 | 49 43 42 65 67 69 6e 20 |revious |ICBegin |
|000035f0| 77 61 73 20 70 61 73 73 | 65 64 20 69 63 52 65 61 |was pass|ed icRea|
|00003600| 64 4f 6e 6c 79 50 65 72 | 6d 2e 0d 20 20 20 20 20 |dOnlyPer|m.. |
|00003610| 2a 20 52 65 74 75 72 6e | 73 20 69 63 50 65 72 6d |* Return|s icPerm|
|00003620| 45 72 72 20 69 66 20 63 | 75 72 72 65 6e 74 20 61 |Err if c|urrent a|
|00003630| 74 74 72 20 69 73 20 6c | 6f 63 6b 65 64 2c 20 6e |ttr is l|ocked, n|
|00003640| 65 77 20 61 74 74 72 20 | 69 73 20 6c 6f 63 6b 65 |ew attr |is locke|
|00003650| 64 20 61 6e 64 20 70 72 | 65 66 68 20 3c 3e 20 6e |d and pr|efh <> n|
|00003660| 69 6c 2e 0d 20 20 20 20 | 20 2a 29 0d 20 20 0d 20 |il.. | *). . |
|00003670| 20 66 75 6e 63 74 69 6f | 6e 20 49 43 43 6f 75 6e | functio|n ICCoun|
|00003680| 74 50 72 65 66 28 69 6e | 73 74 20 3a 20 49 43 49 |tPref(in|st : ICI|
|00003690| 6e 73 74 61 6e 63 65 3b | 20 76 61 72 20 63 6f 75 |nstance;| var cou|
|000036a0| 6e 74 20 3a 20 6c 6f 6e | 67 69 6e 74 29 20 3a 20 |nt : lon|gint) : |
|000036b0| 49 43 45 72 72 6f 72 3b | 0d 20 20 20 20 28 2a 20 |ICError;|. (* |
|000036c0| 59 6f 75 20 6d 75 73 74 | 20 73 70 65 63 69 66 79 |You must| specify|
|000036d0| 20 61 20 63 6f 6e 66 69 | 67 75 72 61 74 69 6f 6e | a confi|guration|
|000036e0| 20 62 65 66 6f 72 65 20 | 63 61 6c 6c 69 6e 67 20 | before |calling |
|000036f0| 74 68 69 73 20 72 6f 75 | 74 69 6e 65 2e 0d 20 20 |this rou|tine.. |
|00003700| 20 20 20 2a 20 59 6f 75 | 20 6d 75 73 74 20 62 65 | * You| must be|
|00003710| 20 69 6e 73 69 64 65 20 | 61 6e 20 49 43 42 65 67 | inside |an ICBeg|
|00003720| 69 6e 2f 45 6e 64 20 70 | 61 69 72 20 74 6f 20 63 |in/End p|air to c|
|00003730| 61 6c 6c 20 74 68 69 73 | 20 72 6f 75 74 69 6e 65 |all this| routine|
|00003740| 2e 0d 20 20 20 20 20 2a | 20 43 6f 75 6e 74 73 20 |.. *| Counts |
|00003750| 74 68 65 20 74 6f 74 61 | 6c 20 6e 75 6d 62 65 72 |the tota|l number|
|00003760| 20 6f 66 20 70 72 65 66 | 65 72 65 6e 63 65 73 2e | of pref|erences.|
|00003770| 0d 20 20 20 20 20 2a 20 | 49 66 20 74 68 65 20 72 |. * |If the r|
|00003780| 6f 75 74 69 6e 65 20 72 | 65 74 75 72 6e 73 20 61 |outine r|eturns a|
|00003790| 6e 20 65 72 72 6f 72 2c | 20 63 6f 75 6e 74 20 69 |n error,| count i|
|000037a0| 73 20 73 65 74 20 74 6f | 20 30 2e 0d 20 20 20 20 |s set to| 0.. |
|000037b0| 20 2a 29 0d 20 20 0d 20 | 20 66 75 6e 63 74 69 6f | *). . | functio|
|000037c0| 6e 20 49 43 47 65 74 49 | 6e 64 50 72 65 66 28 69 |n ICGetI|ndPref(i|
|000037d0| 6e 73 74 20 3a 20 49 43 | 49 6e 73 74 61 6e 63 65 |nst : IC|Instance|
|000037e0| 3b 20 6e 20 3a 20 6c 6f | 6e 67 69 6e 74 3b 20 76 |; n : lo|ngint; v|
|000037f0| 61 72 20 6b 65 79 20 3a | 20 53 74 72 32 35 35 29 |ar key :| Str255)|
|00003800| 20 3a 20 49 43 45 72 72 | 6f 72 3b 0d 20 20 20 20 | : ICErr|or;. |
|00003810| 28 2a 20 59 6f 75 20 6d | 75 73 74 20 73 70 65 63 |(* You m|ust spec|
|00003820| 69 66 79 20 61 20 63 6f | 6e 66 69 67 75 72 61 74 |ify a co|nfigurat|
|00003830| 69 6f 6e 20 62 65 66 6f | 72 65 20 63 61 6c 6c 69 |ion befo|re calli|
|00003840| 6e 67 20 74 68 69 73 20 | 72 6f 75 74 69 6e 65 2e |ng this |routine.|
|00003850| 0d 20 20 20 20 20 2a 20 | 59 6f 75 20 6d 75 73 74 |. * |You must|
|00003860| 20 62 65 20 69 6e 73 69 | 64 65 20 61 6e 20 49 43 | be insi|de an IC|
|00003870| 42 65 67 69 6e 2f 45 6e | 64 20 70 61 69 72 20 74 |Begin/En|d pair t|
|00003880| 6f 20 63 61 6c 6c 20 74 | 68 69 73 20 72 6f 75 74 |o call t|his rout|
|00003890| 69 6e 65 2e 0d 20 20 20 | 20 20 2a 20 52 65 74 75 |ine.. | * Retu|
|000038a0| 72 6e 73 20 74 68 65 20 | 6b 65 79 20 6f 66 20 74 |rns the |key of t|
|000038b0| 68 65 20 4e 74 68 20 70 | 72 65 66 65 72 65 6e 63 |he Nth p|referenc|
|000038c0| 65 2e 0d 20 20 20 20 20 | 2a 20 6e 20 6d 75 73 74 |e.. |* n must|
|000038d0| 20 62 65 20 70 6f 73 69 | 74 69 76 65 2e 0d 20 20 | be posi|tive.. |
|000038e0| 20 20 20 2a 20 52 65 74 | 75 72 6e 73 20 69 63 50 | * Ret|urns icP|
|000038f0| 72 65 66 4e 6f 74 46 6f | 75 6e 64 45 72 72 20 69 |refNotFo|undErr i|
|00003900| 66 20 6e 20 69 73 20 67 | 72 65 61 74 65 72 20 74 |f n is g|reater t|
|00003910| 68 61 6e 20 74 68 65 20 | 74 6f 74 61 6c 20 6e 75 |han the |total nu|
|00003920| 6d 62 65 72 20 6f 66 20 | 70 72 65 66 65 72 65 6e |mber of |preferen|
|00003930| 63 65 73 2e 0d 20 20 20 | 20 20 2a 20 49 66 20 74 |ces.. | * If t|
|00003940| 68 65 20 72 6f 75 74 69 | 6e 65 20 72 65 74 75 72 |he routi|ne retur|
|00003950| 6e 73 20 61 6e 20 65 72 | 72 6f 72 2c 20 6b 65 79 |ns an er|ror, key|
|00003960| 20 69 73 20 75 6e 64 65 | 66 69 6e 65 64 2e 0d 20 | is unde|fined.. |
|00003970| 20 20 20 20 2a 29 0d 20 | 20 0d 20 20 66 75 6e 63 | *). | . func|
|00003980| 74 69 6f 6e 20 49 43 44 | 65 6c 65 74 65 50 72 65 |tion ICD|eletePre|
|00003990| 66 28 69 6e 73 74 20 3a | 20 49 43 49 6e 73 74 61 |f(inst :| ICInsta|
|000039a0| 6e 63 65 3b 20 6b 65 79 | 20 3a 20 53 74 72 32 35 |nce; key| : Str25|
|000039b0| 35 29 20 3a 20 49 43 45 | 72 72 6f 72 3b 0d 20 20 |5) : ICE|rror;. |
|000039c0| 20 20 28 2a 20 59 6f 75 | 20 6d 75 73 74 20 73 70 | (* You| must sp|
|000039d0| 65 63 69 66 79 20 61 20 | 63 6f 6e 66 69 67 75 72 |ecify a |configur|
|000039e0| 61 74 69 6f 6e 20 62 65 | 66 6f 72 65 20 63 61 6c |ation be|fore cal|
|000039f0| 6c 69 6e 67 20 74 68 69 | 73 20 72 6f 75 74 69 6e |ling thi|s routin|
|00003a00| 65 2e 0d 20 20 20 20 20 | 2a 20 59 6f 75 20 6d 75 |e.. |* You mu|
|00003a10| 73 74 20 62 65 20 69 6e | 73 69 64 65 20 61 6e 20 |st be in|side an |
|00003a20| 49 43 42 65 67 69 6e 2f | 45 6e 64 20 70 61 69 72 |ICBegin/|End pair|
|00003a30| 20 74 6f 20 63 61 6c 6c | 20 74 68 69 73 20 72 6f | to call| this ro|
|00003a40| 75 74 69 6e 65 2e 0d 20 | 20 20 20 20 2a 20 44 65 |utine.. | * De|
|00003a50| 6c 65 74 65 73 20 74 68 | 65 20 70 72 65 66 65 72 |letes th|e prefer|
|00003a60| 65 6e 63 65 20 73 70 65 | 63 69 66 69 65 64 20 62 |ence spe|cified b|
|00003a70| 79 20 6b 65 79 2e 0d 20 | 20 20 20 20 2a 20 6b 65 |y key.. | * ke|
|00003a80| 79 20 6d 75 73 74 20 6e | 6f 74 20 62 65 20 74 68 |y must n|ot be th|
|00003a90| 65 20 65 6d 70 74 79 20 | 73 74 72 69 6e 67 2e 0d |e empty |string..|
|00003aa0| 20 20 20 20 20 2a 20 52 | 65 74 75 72 6e 73 20 69 | * R|eturns i|
|00003ab0| 63 50 72 65 66 4e 6f 74 | 46 6f 75 6e 64 20 69 66 |cPrefNot|Found if|
|00003ac0| 20 74 68 65 20 70 72 65 | 66 65 72 65 6e 63 65 20 | the pre|ference |
|00003ad0| 73 70 65 63 69 66 69 65 | 64 20 62 79 20 6b 65 79 |specifie|d by key|
|00003ae0| 20 69 73 20 6e 6f 74 20 | 70 72 65 73 65 6e 74 2e | is not |present.|
|00003af0| 0d 20 20 20 20 20 2a 29 | 0d 20 20 0d 20 20 66 75 |. *)|. . fu|
|00003b00| 6e 63 74 69 6f 6e 20 49 | 43 45 6e 64 28 69 6e 73 |nction I|CEnd(ins|
|00003b10| 74 20 3a 20 49 43 49 6e | 73 74 61 6e 63 65 29 20 |t : ICIn|stance) |
|00003b20| 3a 20 49 43 45 72 72 6f | 72 3b 0d 20 20 20 20 28 |: ICErro|r;. (|
|00003b30| 2a 20 59 6f 75 20 6d 75 | 73 74 20 73 70 65 63 69 |* You mu|st speci|
|00003b40| 66 79 20 61 20 63 6f 6e | 66 69 67 75 72 61 74 69 |fy a con|figurati|
|00003b50| 6f 6e 20 62 65 66 6f 72 | 65 20 63 61 6c 6c 69 6e |on befor|e callin|
|00003b60| 67 20 74 68 69 73 20 72 | 6f 75 74 69 6e 65 2e 0d |g this r|outine..|
|00003b70| 20 20 20 20 20 2a 20 59 | 6f 75 20 6d 75 73 74 20 | * Y|ou must |
|00003b80| 62 65 20 69 6e 73 69 64 | 65 20 61 6e 20 49 43 42 |be insid|e an ICB|
|00003b90| 65 67 69 6e 2f 45 6e 64 | 20 70 61 69 72 20 74 6f |egin/End| pair to|
|00003ba0| 20 63 61 6c 6c 20 74 68 | 69 73 20 72 6f 75 74 69 | call th|is routi|
|00003bb0| 6e 65 2e 0d 20 20 20 20 | 20 2a 20 54 65 72 6d 69 |ne.. | * Termi|
|00003bc0| 6e 61 74 65 73 20 61 20 | 70 72 65 66 65 72 65 6e |nates a |preferen|
|00003bd0| 63 65 20 73 65 73 73 69 | 6f 6e 2c 20 61 73 20 73 |ce sessi|on, as s|
|00003be0| 74 61 72 74 65 64 20 62 | 79 20 49 43 42 65 67 69 |tarted b|y ICBegi|
|00003bf0| 6e 2e 0d 20 20 20 20 20 | 2a 20 59 6f 75 20 6d 75 |n.. |* You mu|
|00003c00| 73 74 20 68 61 76 65 20 | 63 61 6c 6c 65 64 20 49 |st have |called I|
|00003c10| 43 42 65 67 69 6e 20 62 | 65 66 6f 72 65 20 63 61 |CBegin b|efore ca|
|00003c20| 6c 6c 69 6e 67 20 74 68 | 69 73 20 72 6f 75 74 69 |lling th|is routi|
|00003c30| 6e 65 2e 0d 20 20 20 20 | 20 2a 29 0d 20 20 0d 20 |ne.. | *). . |
|00003c40| 20 28 2a 20 2a 2a 2a 2a | 2a 20 55 73 65 72 20 49 | (* ****|* User I|
|00003c50| 6e 74 65 72 66 61 63 65 | 20 53 74 75 66 66 20 2a |nterface| Stuff *|
|00003c60| 2a 2a 2a 2a 20 2a 29 0d | 20 20 0d 20 20 66 75 6e |**** *).| . fun|
|00003c70| 63 74 69 6f 6e 20 49 43 | 45 64 69 74 50 72 65 66 |ction IC|EditPref|
|00003c80| 65 72 65 6e 63 65 73 28 | 69 6e 73 74 20 3a 20 49 |erences(|inst : I|
|00003c90| 43 49 6e 73 74 61 6e 63 | 65 3b 20 6b 65 79 20 3a |CInstanc|e; key :|
|00003ca0| 20 53 74 72 32 35 35 29 | 20 3a 20 49 43 45 72 72 | Str255)| : ICErr|
|00003cb0| 6f 72 3b 0d 20 20 20 20 | 28 2a 20 52 65 71 75 69 |or;. |(* Requi|
|00003cc0| 72 65 73 20 49 43 20 31 | 2e 31 2e 0d 20 20 20 20 |res IC 1|.1.. |
|00003cd0| 20 2a 20 59 6f 75 20 6d | 75 73 74 20 73 70 65 63 | * You m|ust spec|
|00003ce0| 69 66 79 20 61 20 63 6f | 6e 66 69 67 75 72 61 74 |ify a co|nfigurat|
|00003cf0| 69 6f 6e 20 62 65 66 6f | 72 65 20 63 61 6c 6c 69 |ion befo|re calli|
|00003d00| 6e 67 20 74 68 69 73 20 | 72 6f 75 74 69 6e 65 2e |ng this |routine.|
|00003d10| 0d 20 20 20 20 20 2a 20 | 59 6f 75 20 64 6f 20 6e |. * |You do n|
|00003d20| 6f 74 20 68 61 76 65 20 | 74 6f 20 62 65 20 69 6e |ot have |to be in|
|00003d30| 73 69 64 65 20 61 6e 20 | 49 43 42 65 67 69 6e 2f |side an |ICBegin/|
|00003d40| 45 6e 64 20 70 61 69 72 | 20 74 6f 20 63 61 6c 6c |End pair| to call|
|00003d50| 20 74 68 69 73 20 72 6f | 75 74 69 6e 65 2e 0d 20 | this ro|utine.. |
|00003d60| 20 20 20 20 2a 20 49 6e | 73 74 72 75 63 74 73 20 | * In|structs |
|00003d70| 49 43 20 74 6f 20 64 69 | 73 70 6c 61 79 20 74 68 |IC to di|splay th|
|00003d80| 65 20 75 73 65 72 20 69 | 6e 74 65 72 66 61 63 65 |e user i|nterface|
|00003d90| 20 61 73 73 6f 63 69 61 | 74 65 64 20 77 69 74 68 | associa|ted with|
|00003da0| 20 65 64 69 74 69 6e 67 | 0d 20 20 20 20 20 2a 20 | editing|. * |
|00003db0| 70 72 65 66 65 72 65 6e | 63 65 73 20 61 6e 64 20 |preferen|ces and |
|00003dc0| 66 6f 63 75 73 69 6e 67 | 20 6f 6e 20 74 68 65 20 |focusing| on the |
|00003dd0| 70 72 65 66 65 72 65 6e | 63 65 20 73 70 65 63 69 |preferen|ce speci|
|00003de0| 66 69 65 64 20 62 79 20 | 6b 65 79 2e 0d 20 20 20 |fied by |key.. |
|00003df0| 20 20 2a 20 49 66 20 6b | 65 79 20 69 73 20 74 68 | * If k|ey is th|
|00003e00| 65 20 65 6d 70 74 79 20 | 73 74 72 69 6e 67 20 74 |e empty |string t|
|00003e10| 68 65 6e 20 6e 6f 20 70 | 72 65 66 65 72 65 6e 63 |hen no p|referenc|
|00003e20| 65 20 73 68 6f 75 6c 64 | 20 62 65 20 66 6f 63 75 |e should| be focu|
|00003e30| 73 65 64 20 75 70 6f 6e | 2e 0d 20 20 20 20 20 2a |sed upon|.. *|
|00003e40| 20 59 6f 75 20 6d 75 73 | 74 20 68 61 76 65 20 73 | You mus|t have s|
|00003e50| 70 65 63 69 66 69 65 64 | 20 61 20 63 6f 6e 66 69 |pecified| a confi|
|00003e60| 67 75 72 61 74 69 6f 6e | 20 62 65 66 6f 72 65 20 |guration| before |
|00003e70| 63 61 6c 6c 69 6e 67 20 | 74 68 69 73 20 72 6f 75 |calling |this rou|
|00003e80| 74 69 6e 65 2e 0d 20 20 | 20 20 20 2a 20 59 6f 75 |tine.. | * You|
|00003e90| 20 64 6f 20 6e 6f 74 20 | 6e 65 65 64 20 74 6f 20 | do not |need to |
|00003ea0| 63 61 6c 6c 20 49 43 42 | 65 67 69 6e 20 62 65 66 |call ICB|egin bef|
|00003eb0| 6f 72 65 20 63 61 6c 6c | 69 6e 67 20 74 68 69 73 |ore call|ing this|
|00003ec0| 20 72 6f 75 74 69 6e 65 | 2e 0d 20 20 20 20 20 2a | routine|.. *|
|00003ed0| 20 49 6e 20 74 68 65 20 | 63 75 72 72 65 6e 74 20 | In the |current |
|00003ee0| 69 6d 70 6c 65 6d 65 6e | 74 61 74 69 6f 6e 20 74 |implemen|tation t|
|00003ef0| 68 69 73 20 6c 61 75 6e | 63 68 65 73 20 74 68 65 |his laun|ches the|
|00003f00| 20 49 43 20 61 70 70 6c | 69 63 61 74 69 6f 6e 0d | IC appl|ication.|
|00003f10| 20 20 20 20 20 2a 20 28 | 6f 72 20 62 72 69 6e 67 | * (|or bring|
|00003f20| 73 20 69 74 20 74 6f 20 | 74 68 65 20 66 72 6f 6e |s it to |the fron|
|00003f30| 74 29 20 61 6e 64 20 64 | 69 73 70 6c 61 79 73 20 |t) and d|isplays |
|00003f40| 74 68 65 20 77 69 6e 64 | 6f 77 20 63 6f 6e 74 61 |the wind|ow conta|
|00003f50| 69 6e 69 6e 67 0d 20 20 | 20 20 20 2a 20 74 68 65 |ining. | * the|
|00003f60| 20 70 72 65 66 65 72 65 | 6e 63 65 20 73 70 65 63 | prefere|nce spec|
|00003f70| 69 66 69 65 64 20 62 79 | 20 6b 65 79 2e 0d 20 20 |ified by| key.. |
|00003f80| 20 20 20 2a 20 49 74 20 | 6d 61 79 20 68 61 76 65 | * It |may have|
|00003f90| 20 61 20 72 61 64 69 63 | 61 6c 6c 79 20 64 69 66 | a radic|ally dif|
|00003fa0| 66 65 72 65 6e 74 20 69 | 6d 70 6c 65 6d 65 6e 74 |ferent i|mplement|
|00003fb0| 61 74 69 6f 6e 20 69 6e | 20 66 75 74 75 72 65 0d |ation in| future.|
|00003fc0| 20 20 20 20 20 2a 20 49 | 43 20 73 79 73 74 65 6d | * I|C system|
|00003fd0| 73 2e 0d 20 20 20 20 20 | 2a 29 0d 20 20 0d 20 20 |s.. |*). . |
|00003fe0| 28 2a 20 2a 2a 2a 2a 2a | 20 55 52 4c 20 48 61 6e |(* *****| URL Han|
|00003ff0| 64 6c 69 6e 67 20 2a 2a | 2a 2a 2a 20 2a 29 0d 20 |dling **|*** *). |
|00004000| 20 0d 20 20 66 75 6e 63 | 74 69 6f 6e 20 49 43 50 | . func|tion ICP|
|00004010| 61 72 73 65 55 52 4c 28 | 69 6e 73 74 20 3a 20 49 |arseURL(|inst : I|
|00004020| 43 49 6e 73 74 61 6e 63 | 65 3b 20 68 69 6e 74 20 |CInstanc|e; hint |
|00004030| 3a 20 53 74 72 32 35 35 | 3b 20 64 61 74 61 20 3a |: Str255|; data :|
|00004040| 20 50 74 72 3b 20 6c 65 | 6e 20 3a 20 6c 6f 6e 67 | Ptr; le|n : long|
|00004050| 69 6e 74 3b 20 76 61 72 | 20 73 65 6c 53 74 61 72 |int; var| selStar|
|00004060| 74 20 3a 20 6c 6f 6e 67 | 69 6e 74 3b 20 76 61 72 |t : long|int; var|
|00004070| 20 73 65 6c 45 6e 64 20 | 3a 20 6c 6f 6e 67 69 6e | selEnd |: longin|
|00004080| 74 3b 20 75 72 6c 20 3a | 20 48 61 6e 64 6c 65 29 |t; url :| Handle)|
|00004090| 20 3a 20 49 43 45 72 72 | 6f 72 3b 0d 20 20 20 20 | : ICErr|or;. |
|000040a0| 28 2a 20 52 65 71 75 69 | 72 65 73 20 49 43 20 31 |(* Requi|res IC 1|
|000040b0| 2e 31 2e 0d 20 20 20 20 | 20 2a 20 59 6f 75 20 6d |.1.. | * You m|
|000040c0| 75 73 74 20 73 70 65 63 | 69 66 79 20 61 20 63 6f |ust spec|ify a co|
|000040d0| 6e 66 69 67 75 72 61 74 | 69 6f 6e 20 62 65 66 6f |nfigurat|ion befo|
|000040e0| 72 65 20 63 61 6c 6c 69 | 6e 67 20 74 68 69 73 20 |re calli|ng this |
|000040f0| 72 6f 75 74 69 6e 65 2e | 0d 20 20 20 20 20 2a 20 |routine.|. * |
|00004100| 59 6f 75 20 64 6f 20 6e | 6f 74 20 68 61 76 65 20 |You do n|ot have |
|00004110| 74 6f 20 62 65 20 69 6e | 73 69 64 65 20 61 6e 20 |to be in|side an |
|00004120| 49 43 42 65 67 69 6e 2f | 45 6e 64 20 70 61 69 72 |ICBegin/|End pair|
|00004130| 20 74 6f 20 63 61 6c 6c | 20 74 68 69 73 20 72 6f | to call| this ro|
|00004140| 75 74 69 6e 65 2e 0d 20 | 20 20 20 20 2a 20 50 61 |utine.. | * Pa|
|00004150| 72 73 65 73 20 61 20 55 | 52 4c 20 6f 75 74 20 6f |rses a U|RL out o|
|00004160| 66 20 74 68 65 20 73 70 | 65 63 69 66 69 65 64 20 |f the sp|ecified |
|00004170| 74 65 78 74 20 61 6e 64 | 20 72 65 74 75 72 6e 73 |text and| returns|
|00004180| 20 69 74 20 69 6e 20 61 | 20 63 61 6e 6f 6e 69 63 | it in a| canonic|
|00004190| 61 6c 20 66 6f 72 6d 0d | 20 20 20 20 20 2a 20 69 |al form.| * i|
|000041a0| 6e 20 61 20 68 61 6e 64 | 6c 65 2e 0d 20 20 20 20 |n a hand|le.. |
|000041b0| 20 2a 20 68 69 6e 74 20 | 69 6e 64 69 63 61 74 65 | * hint |indicate|
|000041c0| 73 20 74 68 65 20 64 65 | 66 61 75 6c 74 20 73 63 |s the de|fault sc|
|000041d0| 68 65 6d 65 20 66 6f 72 | 20 55 52 4c 73 20 6f 66 |heme for| URLs of|
|000041e0| 20 74 68 65 20 66 6f 72 | 6d 20 22 6e 61 6d 65 40 | the for|m "name@|
|000041f0| 61 64 64 72 65 73 73 22 | 2e 0d 20 20 20 20 20 2a |address"|.. *|
|00004200| 20 49 66 20 68 69 6e 74 | 20 69 73 20 74 68 65 20 | If hint| is the |
|00004210| 65 6d 70 74 79 20 73 74 | 72 69 6e 67 20 74 68 65 |empty st|ring the|
|00004220| 6e 20 55 52 4c 73 20 6f | 66 20 74 68 61 74 20 66 |n URLs o|f that f|
|00004230| 6f 72 6d 20 61 72 65 20 | 6e 6f 74 20 61 6c 6c 6f |orm are |not allo|
|00004240| 77 65 64 2e 0d 20 20 20 | 20 20 2a 20 64 61 74 61 |wed.. | * data|
|00004250| 20 70 6f 69 6e 74 73 20 | 74 6f 20 74 68 65 20 73 | points |to the s|
|00004260| 74 61 72 74 20 6f 66 20 | 74 68 65 20 74 65 78 74 |tart of |the text|
|00004270| 2e 20 49 74 20 6d 75 73 | 74 20 6e 6f 74 20 62 65 |. It mus|t not be|
|00004280| 20 6e 69 6c 2e 0d 20 20 | 20 20 20 2a 20 6c 65 6e | nil.. | * len|
|00004290| 20 69 6e 64 69 63 61 74 | 65 73 20 74 68 65 20 6c | indicat|es the l|
|000042a0| 65 6e 67 74 68 20 6f 66 | 20 74 68 65 20 74 65 78 |ength of| the tex|
|000042b0| 74 2e 20 49 74 20 6d 75 | 73 74 20 62 65 20 6e 6f |t. It mu|st be no|
|000042c0| 6e 2d 6e 65 67 61 74 69 | 76 65 2e 0d 20 20 20 20 |n-negati|ve.. |
|000042d0| 20 2a 20 73 65 6c 53 74 | 61 72 74 20 61 6e 64 20 | * selSt|art and |
|000042e0| 73 65 6c 45 6e 64 20 73 | 68 6f 75 6c 64 20 62 65 |selEnd s|hould be|
|000042f0| 20 70 61 73 73 65 64 20 | 69 6e 20 61 73 20 74 68 | passed |in as th|
|00004300| 65 20 63 75 72 72 65 6e | 74 20 73 65 6c 65 63 74 |e curren|t select|
|00004310| 69 6f 6e 20 6f 66 0d 20 | 20 20 20 20 2a 20 74 68 |ion of. | * th|
|00004320| 65 20 74 65 78 74 2e 20 | 54 68 69 73 20 73 65 6c |e text. |This sel|
|00004330| 65 63 74 69 6f 6e 20 69 | 73 20 67 69 76 65 6e 20 |ection i|s given |
|00004340| 69 6e 20 74 68 65 20 73 | 61 6d 65 20 6d 61 6e 6e |in the s|ame mann|
|00004350| 65 72 20 61 73 20 54 65 | 78 74 45 64 69 74 2c 0d |er as Te|xtEdit,.|
|00004360| 20 20 20 20 20 2a 20 69 | 65 20 69 66 20 73 65 6c | * i|e if sel|
|00004370| 53 74 61 72 74 20 3d 20 | 73 65 6c 45 6e 64 20 74 |Start = |selEnd t|
|00004380| 68 65 6e 20 74 68 65 72 | 65 20 69 73 20 6e 6f 20 |hen ther|e is no |
|00004390| 73 65 6c 65 63 74 69 6f | 6e 20 6f 6e 6c 79 20 61 |selectio|n only a|
|000043a0| 6e 20 69 6e 73 65 72 74 | 69 6f 6e 0d 20 20 20 20 |n insert|ion. |
|000043b0| 20 2a 20 70 6f 69 6e 74 | 2e 20 41 6c 73 6f 20 73 | * point|. Also s|
|000043c0| 65 6c 53 74 61 72 74 20 | b2 20 73 65 6c 45 6e 64 |elStart |. selEnd|
|000043d0| 20 61 6e 64 20 30 20 b2 | 20 73 65 6c 53 74 61 72 | and 0 .| selStar|
|000043e0| 74 20 b2 20 6c 65 6e 20 | 61 6e 64 20 30 20 b2 20 |t . len |and 0 . |
|000043f0| 73 65 6c 45 6e 64 20 b2 | 20 6c 65 6e 2e 0d 20 20 |selEnd .| len.. |
|00004400| 20 20 20 2a 20 73 65 6c | 53 74 61 72 74 20 61 6e | * sel|Start an|
|00004410| 64 20 73 65 6c 45 6e 64 | 20 61 72 65 20 72 65 74 |d selEnd| are ret|
|00004420| 75 72 6e 65 64 20 61 73 | 20 74 68 65 20 62 6f 75 |urned as| the bou|
|00004430| 6e 64 73 20 6f 66 20 74 | 68 65 20 55 52 4c 2e 20 |nds of t|he URL. |
|00004440| 49 66 20 74 68 65 0d 20 | 20 20 20 20 2a 20 72 6f |If the. | * ro|
|00004450| 75 74 69 6e 65 20 72 65 | 74 75 72 6e 73 20 61 6e |utine re|turns an|
|00004460| 20 65 72 72 6f 72 20 74 | 68 65 6e 20 74 68 65 73 | error t|hen thes|
|00004470| 65 20 6e 65 77 20 62 6f | 75 6e 64 61 72 69 65 73 |e new bo|undaries|
|00004480| 20 6d 61 79 20 62 65 0d | 20 20 20 20 20 2a 20 69 | may be.| * i|
|00004490| 6e 76 61 6c 69 64 20 62 | 75 74 20 74 68 65 79 20 |nvalid b|ut they |
|000044a0| 77 69 6c 6c 20 62 65 20 | 63 6c 6f 73 65 2e 0d 20 |will be |close.. |
|000044b0| 20 20 20 20 2a 20 54 68 | 65 20 69 6e 63 6f 6d 69 | * Th|e incomi|
|000044c0| 6e 67 20 75 72 6c 20 68 | 61 6e 64 6c 65 20 6d 75 |ng url h|andle mu|
|000044d0| 73 74 20 6e 6f 74 20 62 | 65 20 6e 69 6c 2e 20 20 |st not b|e nil. |
|000044e0| 54 68 65 20 72 65 73 75 | 6c 74 69 6e 67 20 55 52 |The resu|lting UR|
|000044f0| 4c 20 69 73 20 6e 6f 72 | 6d 61 6c 69 73 65 64 0d |L is nor|malised.|
|00004500| 20 20 20 20 20 2a 20 61 | 6e 64 20 63 6f 70 69 65 | * a|nd copie|
|00004510| 64 20 69 6e 74 6f 20 74 | 68 65 20 75 72 6c 20 68 |d into t|he url h|
|00004520| 61 6e 64 6c 65 2c 20 77 | 68 69 63 68 20 69 73 20 |andle, w|hich is |
|00004530| 72 65 73 69 7a 65 64 20 | 74 6f 20 66 69 74 2e 0d |resized |to fit..|
|00004540| 20 20 20 20 20 2a 29 0d | 20 20 0d 20 20 66 75 6e | *).| . fun|
|00004550| 63 74 69 6f 6e 20 49 43 | 4c 61 75 6e 63 68 55 52 |ction IC|LaunchUR|
|00004560| 4c 28 69 6e 73 74 20 3a | 20 49 43 49 6e 73 74 61 |L(inst :| ICInsta|
|00004570| 6e 63 65 3b 20 68 69 6e | 74 20 3a 20 53 74 72 32 |nce; hin|t : Str2|
|00004580| 35 35 3b 20 64 61 74 61 | 20 3a 20 50 74 72 3b 20 |55; data| : Ptr; |
|00004590| 6c 65 6e 20 3a 20 6c 6f | 6e 67 69 6e 74 3b 20 76 |len : lo|ngint; v|
|000045a0| 61 72 20 73 65 6c 53 74 | 61 72 74 20 3a 20 6c 6f |ar selSt|art : lo|
|000045b0| 6e 67 69 6e 74 3b 20 76 | 61 72 20 73 65 6c 45 6e |ngint; v|ar selEn|
|000045c0| 64 20 3a 20 6c 6f 6e 67 | 69 6e 74 29 20 3a 20 49 |d : long|int) : I|
|000045d0| 43 45 72 72 6f 72 3b 0d | 20 20 20 20 28 2a 20 52 |CError;.| (* R|
|000045e0| 65 71 75 69 72 65 73 20 | 49 43 20 31 2e 31 2e 0d |equires |IC 1.1..|
|000045f0| 20 20 20 20 20 2a 20 59 | 6f 75 20 6d 75 73 74 20 | * Y|ou must |
|00004600| 73 70 65 63 69 66 79 20 | 61 20 63 6f 6e 66 69 67 |specify |a config|
|00004610| 75 72 61 74 69 6f 6e 20 | 62 65 66 6f 72 65 20 63 |uration |before c|
|00004620| 61 6c 6c 69 6e 67 20 74 | 68 69 73 20 72 6f 75 74 |alling t|his rout|
|00004630| 69 6e 65 2e 0d 20 20 20 | 20 20 2a 20 59 6f 75 20 |ine.. | * You |
|00004640| 64 6f 20 6e 6f 74 20 68 | 61 76 65 20 74 6f 20 62 |do not h|ave to b|
|00004650| 65 20 69 6e 73 69 64 65 | 20 61 6e 20 49 43 42 65 |e inside| an ICBe|
|00004660| 67 69 6e 2f 45 6e 64 20 | 70 61 69 72 20 74 6f 20 |gin/End |pair to |
|00004670| 63 61 6c 6c 20 74 68 69 | 73 20 72 6f 75 74 69 6e |call thi|s routin|
|00004680| 65 2e 0d 20 20 20 20 20 | 2a 20 50 61 72 73 65 73 |e.. |* Parses|
|00004690| 20 61 20 55 52 4c 20 6f | 75 74 20 6f 66 20 74 68 | a URL o|ut of th|
|000046a0| 65 20 73 70 65 63 69 66 | 69 65 64 20 74 65 78 74 |e specif|ied text|
|000046b0| 20 61 6e 64 20 66 65 65 | 64 73 20 69 74 20 6f 66 | and fee|ds it of|
|000046c0| 66 20 74 6f 20 74 68 65 | 0d 20 20 20 20 20 2a 20 |f to the|. * |
|000046d0| 61 70 70 72 6f 70 72 69 | 61 74 65 20 68 65 6c 70 |appropri|ate help|
|000046e0| 65 72 2e 0d 20 20 20 20 | 20 2a 20 68 69 6e 74 20 |er.. | * hint |
|000046f0| 69 6e 64 69 63 61 74 65 | 73 20 74 68 65 20 64 65 |indicate|s the de|
|00004700| 66 61 75 6c 74 20 73 63 | 68 65 6d 65 20 66 6f 72 |fault sc|heme for|
|00004710| 20 55 52 4c 73 20 6f 66 | 20 74 68 65 20 66 6f 72 | URLs of| the for|
|00004720| 6d 20 22 6e 61 6d 65 40 | 61 64 64 72 65 73 73 22 |m "name@|address"|
|00004730| 2e 0d 20 20 20 20 20 2a | 20 49 66 20 68 69 6e 74 |.. *| If hint|
|00004740| 20 69 73 20 74 68 65 20 | 65 6d 70 74 79 20 73 74 | is the |empty st|
|00004750| 72 69 6e 67 20 74 68 65 | 6e 20 55 52 4c 73 20 6f |ring the|n URLs o|
|00004760| 66 20 74 68 61 74 20 66 | 6f 72 6d 20 61 72 65 20 |f that f|orm are |
|00004770| 6e 6f 74 20 61 6c 6c 6f | 77 65 64 2e 0d 20 20 20 |not allo|wed.. |
|00004780| 20 20 2a 20 64 61 74 61 | 20 70 6f 69 6e 74 73 20 | * data| points |
|00004790| 74 6f 20 74 68 65 20 73 | 74 61 72 74 20 6f 66 20 |to the s|tart of |
|000047a0| 74 68 65 20 74 65 78 74 | 2e 20 49 74 20 6d 75 73 |the text|. It mus|
|000047b0| 74 20 6e 6f 74 20 62 65 | 20 6e 69 6c 2e 0d 20 20 |t not be| nil.. |
|000047c0| 20 20 20 2a 20 6c 65 6e | 20 69 6e 64 69 63 61 74 | * len| indicat|
|000047d0| 65 73 20 74 68 65 20 6c | 65 6e 67 74 68 20 6f 66 |es the l|ength of|
|000047e0| 20 74 68 65 20 74 65 78 | 74 2e 20 49 74 20 6d 75 | the tex|t. It mu|
|000047f0| 73 74 20 62 65 20 6e 6f | 6e 2d 6e 65 67 61 74 69 |st be no|n-negati|
|00004800| 76 65 2e 0d 20 20 20 20 | 20 2a 20 73 65 6c 53 74 |ve.. | * selSt|
|00004810| 61 72 74 20 61 6e 64 20 | 73 65 6c 45 6e 64 20 73 |art and |selEnd s|
|00004820| 68 6f 75 6c 64 20 62 65 | 20 70 61 73 73 65 64 20 |hould be| passed |
|00004830| 69 6e 20 61 73 20 74 68 | 65 20 63 75 72 72 65 6e |in as th|e curren|
|00004840| 74 20 73 65 6c 65 63 74 | 69 6f 6e 20 6f 66 0d 20 |t select|ion of. |
|00004850| 20 20 20 20 2a 20 74 68 | 65 20 74 65 78 74 2e 20 | * th|e text. |
|00004860| 54 68 69 73 20 73 65 6c | 65 63 74 69 6f 6e 20 69 |This sel|ection i|
|00004870| 73 20 67 69 76 65 6e 20 | 69 6e 20 74 68 65 20 73 |s given |in the s|
|00004880| 61 6d 65 20 6d 61 6e 6e | 65 72 20 61 73 20 54 65 |ame mann|er as Te|
|00004890| 78 74 45 64 69 74 2c 0d | 20 20 20 20 20 2a 20 69 |xtEdit,.| * i|
|000048a0| 65 20 69 66 20 73 65 6c | 53 74 61 72 74 20 3d 20 |e if sel|Start = |
|000048b0| 73 65 6c 45 6e 64 20 74 | 68 65 6e 20 74 68 65 72 |selEnd t|hen ther|
|000048c0| 65 20 69 73 20 6e 6f 20 | 73 65 6c 65 63 74 69 6f |e is no |selectio|
|000048d0| 6e 20 6f 6e 6c 79 20 61 | 6e 20 69 6e 73 65 72 74 |n only a|n insert|
|000048e0| 69 6f 6e 0d 20 20 20 20 | 20 2a 20 70 6f 69 6e 74 |ion. | * point|
|000048f0| 2e 20 41 6c 73 6f 20 73 | 65 6c 53 74 61 72 74 20 |. Also s|elStart |
|00004900| b2 20 73 65 6c 45 6e 64 | 20 61 6e 64 20 30 20 b2 |. selEnd| and 0 .|
|00004910| 20 73 65 6c 53 74 61 72 | 74 20 b2 20 6c 65 6e 20 | selStar|t . len |
|00004920| 61 6e 64 20 30 20 b2 20 | 73 65 6c 45 6e 64 20 b2 |and 0 . |selEnd .|
|00004930| 20 6c 65 6e 2e 0d 20 20 | 20 20 20 2a 20 73 65 6c | len.. | * sel|
|00004940| 53 74 61 72 74 20 61 6e | 64 20 73 65 6c 45 6e 64 |Start an|d selEnd|
|00004950| 20 61 72 65 20 72 65 74 | 75 72 6e 65 64 20 61 73 | are ret|urned as|
|00004960| 20 74 68 65 20 62 6f 75 | 6e 64 73 20 6f 66 20 74 | the bou|nds of t|
|00004970| 68 65 20 55 52 4c 2e 20 | 49 66 20 74 68 65 0d 20 |he URL. |If the. |
|00004980| 20 20 20 20 2a 20 72 6f | 75 74 69 6e 65 20 72 65 | * ro|utine re|
|00004990| 74 75 72 6e 73 20 61 6e | 20 65 72 72 6f 72 20 74 |turns an| error t|
|000049a0| 68 65 6e 20 74 68 65 73 | 65 20 6e 65 77 20 62 6f |hen thes|e new bo|
|000049b0| 75 6e 64 61 72 69 65 73 | 20 6d 61 79 20 62 65 0d |undaries| may be.|
|000049c0| 20 20 20 20 20 2a 20 69 | 6e 76 61 6c 69 64 20 62 | * i|nvalid b|
|000049d0| 75 74 20 74 68 65 79 20 | 77 69 6c 6c 20 62 65 20 |ut they |will be |
|000049e0| 63 6c 6f 73 65 2e 0d 20 | 20 20 20 20 2a 20 54 68 |close.. | * Th|
|000049f0| 65 20 55 52 4c 20 69 73 | 20 70 61 72 73 65 64 20 |e URL is| parsed |
|00004a00| 6f 75 74 20 6f 66 20 74 | 68 65 20 74 65 78 74 20 |out of t|he text |
|00004a10| 61 6e 64 20 70 61 73 73 | 65 64 20 6f 66 66 20 74 |and pass|ed off t|
|00004a20| 6f 20 74 68 65 20 61 70 | 70 72 6f 70 72 69 61 74 |o the ap|propriat|
|00004a30| 65 0d 20 20 20 20 20 2a | 20 68 65 6c 70 65 72 20 |e. *| helper |
|00004a40| 75 73 69 6e 67 20 74 68 | 65 20 47 55 52 4c 20 41 |using th|e GURL A|
|00004a50| 70 70 6c 65 45 76 65 6e | 74 2e 0d 20 20 20 20 20 |ppleEven|t.. |
|00004a60| 2a 29 0d 20 20 0d 20 20 | 28 2a 20 2a 2a 2a 2a 2a |*). . |(* *****|
|00004a70| 20 4d 61 70 70 69 6e 67 | 73 20 52 6f 75 74 69 6e | Mapping|s Routin|
|00004a80| 65 73 20 2a 2a 2a 2a 2a | 0d 20 20 20 2a 20 0d 20 |es *****|. * . |
|00004a90| 20 20 2a 20 52 6f 75 74 | 69 6e 65 73 20 66 6f 72 | * Rout|ines for|
|00004aa0| 20 69 6e 74 65 72 72 6f | 67 61 74 69 6e 67 20 6d | interro|gating m|
|00004ab0| 61 70 70 69 6e 67 73 20 | 64 61 74 61 62 61 73 65 |appings |database|
|00004ac0| 2e 0d 20 20 20 2a 20 0d | 20 20 20 2a 20 2d 2d 2d |.. * .| * ---|
|00004ad0| 2d 2d 20 48 69 67 68 20 | 4c 65 76 65 6c 20 52 6f |-- High |Level Ro|
|00004ae0| 75 74 69 6e 65 73 20 2d | 2d 2d 2d 2d 0d 20 20 20 |utines -|----. |
|00004af0| 2a 29 0d 20 20 0d 20 20 | 66 75 6e 63 74 69 6f 6e |*). . |function|
|00004b00| 20 49 43 4d 61 70 46 69 | 6c 65 6e 61 6d 65 28 69 | ICMapFi|lename(i|
|00004b10| 6e 73 74 20 3a 20 49 43 | 49 6e 73 74 61 6e 63 65 |nst : IC|Instance|
|00004b20| 3b 20 66 69 6c 65 6e 61 | 6d 65 20 3a 20 53 74 72 |; filena|me : Str|
|00004b30| 32 35 35 3b 20 76 61 72 | 20 65 6e 74 72 79 20 3a |255; var| entry :|
|00004b40| 20 49 43 4d 61 70 45 6e | 74 72 79 29 20 3a 20 49 | ICMapEn|try) : I|
|00004b50| 43 45 72 72 6f 72 3b 0d | 20 20 20 20 28 2a 20 52 |CError;.| (* R|
|00004b60| 65 71 75 69 72 65 73 20 | 49 43 20 31 2e 31 2e 0d |equires |IC 1.1..|
|00004b70| 20 20 20 20 20 2a 20 59 | 6f 75 20 6d 75 73 74 20 | * Y|ou must |
|00004b80| 73 70 65 63 69 66 79 20 | 61 20 63 6f 6e 66 69 67 |specify |a config|
|00004b90| 75 72 61 74 69 6f 6e 20 | 62 65 66 6f 72 65 20 63 |uration |before c|
|00004ba0| 61 6c 6c 69 6e 67 20 74 | 68 69 73 20 72 6f 75 74 |alling t|his rout|
|00004bb0| 69 6e 65 2e 0d 20 20 20 | 20 20 2a 20 49 66 20 79 |ine.. | * If y|
|00004bc0| 6f 75 20 61 72 65 20 67 | 65 74 74 69 6e 67 20 6f |ou are g|etting o|
|00004bd0| 72 20 73 65 74 74 69 6e | 67 20 6d 75 6c 74 69 70 |r settin|g multip|
|00004be0| 6c 65 20 70 72 65 66 65 | 72 65 6e 63 65 73 2c 20 |le prefe|rences, |
|00004bf0| 79 6f 75 20 73 68 6f 75 | 6c 64 20 70 6c 61 63 65 |you shou|ld place|
|00004c00| 0d 20 20 20 20 20 2a 20 | 74 68 65 73 65 20 63 61 |. * |these ca|
|00004c10| 6c 6c 73 20 77 69 74 68 | 69 6e 20 61 6e 20 49 43 |lls with|in an IC|
|00004c20| 42 65 67 69 6e 2f 49 43 | 45 6e 64 20 70 61 69 72 |Begin/IC|End pair|
|00004c30| 2e 0d 20 20 20 20 20 2a | 20 49 66 20 79 6f 75 20 |.. *| If you |
|00004c40| 63 61 6c 6c 20 74 68 69 | 73 20 72 6f 75 74 69 6e |call thi|s routin|
|00004c50| 65 20 6f 75 74 73 69 64 | 65 20 6f 66 20 73 75 63 |e outsid|e of suc|
|00004c60| 68 20 61 20 70 61 69 72 | 2c 20 69 74 20 69 6d 70 |h a pair|, it imp|
|00004c70| 6c 69 63 69 74 6c 79 0d | 20 20 20 20 20 2a 20 63 |licitly.| * c|
|00004c80| 61 6c 6c 73 20 49 43 42 | 65 67 69 6e 28 69 6e 73 |alls ICB|egin(ins|
|00004c90| 74 2c 20 69 63 52 65 61 | 64 57 72 69 74 65 50 65 |t, icRea|dWritePe|
|00004ca0| 72 6d 29 2e 0d 20 20 20 | 20 20 2a 20 54 61 6b 65 |rm).. | * Take|
|00004cb0| 73 20 74 68 65 20 6e 61 | 6d 65 20 6f 66 20 61 6e |s the na|me of an|
|00004cc0| 20 69 6e 63 6f 6d 69 6e | 67 20 66 69 6c 65 20 61 | incomin|g file a|
|00004cd0| 6e 64 20 72 65 74 75 72 | 6e 73 20 74 68 65 20 6d |nd retur|ns the m|
|00004ce0| 6f 73 74 20 61 70 70 72 | 6f 70 72 69 61 74 65 0d |ost appr|opriate.|
|00004cf0| 20 20 20 20 20 2a 20 6d | 61 70 70 69 6e 67 73 20 | * m|appings |
|00004d00| 64 61 74 61 62 61 73 65 | 20 65 6e 74 72 79 2c 20 |database| entry, |
|00004d10| 62 61 73 65 64 20 6f 6e | 20 69 74 73 20 65 78 74 |based on| its ext|
|00004d20| 65 6e 73 69 6f 6e 2e 0d | 20 20 20 20 20 2a 20 66 |ension..| * f|
|00004d30| 69 6c 65 6e 61 6d 65 20 | 6d 75 73 74 20 6e 6f 74 |ilename |must not|
|00004d40| 20 62 65 20 74 68 65 20 | 65 6d 70 74 79 20 73 74 | be the |empty st|
|00004d50| 72 69 6e 67 2e 0d 20 20 | 20 20 20 2a 20 52 65 74 |ring.. | * Ret|
|00004d60| 75 72 6e 73 20 69 63 50 | 72 65 66 4e 6f 74 46 6f |urns icP|refNotFo|
|00004d70| 75 6e 64 45 72 72 20 69 | 66 20 6e 6f 20 73 75 69 |undErr i|f no sui|
|00004d80| 74 61 62 6c 65 20 65 6e | 74 72 79 20 69 73 20 66 |table en|try is f|
|00004d90| 6f 75 6e 64 2e 0d 20 20 | 20 20 20 2a 29 0d 20 20 |ound.. | *). |
|00004da0| 0d 20 20 66 75 6e 63 74 | 69 6f 6e 20 49 43 4d 61 |. funct|ion ICMa|
|00004db0| 70 54 79 70 65 43 72 65 | 61 74 6f 72 28 69 6e 73 |pTypeCre|ator(ins|
|00004dc0| 74 20 3a 20 49 43 49 6e | 73 74 61 6e 63 65 3b 20 |t : ICIn|stance; |
|00004dd0| 66 54 79 70 65 20 3a 20 | 4f 53 54 79 70 65 3b 20 |fType : |OSType; |
|00004de0| 66 43 72 65 61 74 6f 72 | 20 3a 20 4f 53 54 79 70 |fCreator| : OSTyp|
|00004df0| 65 3b 20 66 69 6c 65 6e | 61 6d 65 20 3a 20 53 74 |e; filen|ame : St|
|00004e00| 72 32 35 35 3b 20 76 61 | 72 20 65 6e 74 72 79 20 |r255; va|r entry |
|00004e10| 3a 20 49 43 4d 61 70 45 | 6e 74 72 79 29 20 3a 20 |: ICMapE|ntry) : |
|00004e20| 49 43 45 72 72 6f 72 3b | 0d 20 20 20 20 28 2a 20 |ICError;|. (* |
|00004e30| 52 65 71 75 69 72 65 73 | 20 49 43 20 31 2e 31 2e |Requires| IC 1.1.|
|00004e40| 0d 20 20 20 20 20 2a 20 | 59 6f 75 20 6d 75 73 74 |. * |You must|
|00004e50| 20 73 70 65 63 69 66 79 | 20 61 20 63 6f 6e 66 69 | specify| a confi|
|00004e60| 67 75 72 61 74 69 6f 6e | 20 62 65 66 6f 72 65 20 |guration| before |
|00004e70| 63 61 6c 6c 69 6e 67 20 | 74 68 69 73 20 72 6f 75 |calling |this rou|
|00004e80| 74 69 6e 65 2e 0d 20 20 | 20 20 20 2a 20 59 6f 75 |tine.. | * You|
|00004e90| 20 6d 75 73 74 20 62 65 | 20 69 6e 73 69 64 65 20 | must be| inside |
|00004ea0| 61 6e 20 49 43 42 65 67 | 69 6e 2f 45 6e 64 20 70 |an ICBeg|in/End p|
|00004eb0| 61 69 72 20 74 6f 20 63 | 61 6c 6c 20 74 68 69 73 |air to c|all this|
|00004ec0| 20 72 6f 75 74 69 6e 65 | 2e 0d 20 20 20 20 20 2a | routine|.. *|
|00004ed0| 20 54 61 6b 65 73 20 74 | 68 65 20 74 79 70 65 20 | Takes t|he type |
|00004ee0| 61 6e 64 20 63 72 65 61 | 74 6f 72 20 28 61 6e 64 |and crea|tor (and|
|00004ef0| 20 6f 70 74 69 6f 6e 61 | 6c 6c 79 20 74 68 65 20 | optiona|lly the |
|00004f00| 6e 61 6d 65 29 20 6f 66 | 20 61 6e 20 6f 75 74 67 |name) of| an outg|
|00004f10| 6f 69 6e 67 0d 20 20 20 | 20 20 2a 20 66 69 6c 65 |oing. | * file|
|00004f20| 20 61 6e 64 20 72 65 74 | 75 72 6e 73 20 74 68 65 | and ret|urns the|
|00004f30| 20 6d 6f 73 74 20 61 70 | 70 72 6f 70 72 69 61 74 | most ap|propriat|
|00004f40| 65 20 6d 61 70 70 69 6e | 67 73 20 64 61 74 61 62 |e mappin|gs datab|
|00004f50| 61 73 65 20 65 6e 74 72 | 79 2e 0d 20 20 20 20 20 |ase entr|y.. |
|00004f60| 2a 20 54 68 65 20 66 69 | 6c 65 6e 61 6d 65 20 6d |* The fi|lename m|
|00004f70| 61 79 20 62 65 20 65 69 | 74 68 65 72 20 74 68 65 |ay be ei|ther the|
|00004f80| 20 6e 61 6d 65 20 6f 66 | 20 74 68 65 20 6f 75 74 | name of| the out|
|00004f90| 67 6f 69 6e 67 20 66 69 | 6c 65 20 6f 72 0d 20 20 |going fi|le or. |
|00004fa0| 20 20 20 2a 20 74 68 65 | 20 65 6d 70 74 79 20 73 | * the| empty s|
|00004fb0| 74 72 69 6e 67 2e 0d 20 | 20 20 20 20 2a 20 52 65 |tring.. | * Re|
|00004fc0| 74 75 72 6e 73 20 69 63 | 50 72 65 66 4e 6f 74 46 |turns ic|PrefNotF|
|00004fd0| 6f 75 6e 64 45 72 72 20 | 69 66 20 6e 6f 20 73 75 |oundErr |if no su|
|00004fe0| 69 74 61 62 6c 65 20 65 | 6e 74 72 79 20 66 6f 75 |itable e|ntry fou|
|00004ff0| 6e 64 2e 0d 20 20 20 20 | 20 2a 29 0d 20 20 0d 20 |nd.. | *). . |
|00005000| 20 28 2a 20 2d 2d 2d 2d | 2d 20 4d 69 64 20 4c 65 | (* ----|- Mid Le|
|00005010| 76 65 6c 20 52 6f 75 74 | 69 6e 65 73 20 2d 2d 2d |vel Rout|ines ---|
|00005020| 2d 2d 20 2a 29 0d 20 20 | 0d 20 20 66 75 6e 63 74 |-- *). |. funct|
|00005030| 69 6f 6e 20 49 43 4d 61 | 70 45 6e 74 72 69 65 73 |ion ICMa|pEntries|
|00005040| 46 69 6c 65 6e 61 6d 65 | 28 69 6e 73 74 20 3a 20 |Filename|(inst : |
|00005050| 49 43 49 6e 73 74 61 6e | 63 65 3b 20 65 6e 74 72 |ICInstan|ce; entr|
|00005060| 69 65 73 20 3a 20 48 61 | 6e 64 6c 65 3b 20 66 69 |ies : Ha|ndle; fi|
|00005070| 6c 65 6e 61 6d 65 20 3a | 20 53 74 72 32 35 35 3b |lename :| Str255;|
|00005080| 20 76 61 72 20 65 6e 74 | 72 79 20 3a 20 49 43 4d | var ent|ry : ICM|
|00005090| 61 70 45 6e 74 72 79 29 | 20 3a 20 49 43 45 72 72 |apEntry)| : ICErr|
|000050a0| 6f 72 3b 0d 20 20 20 20 | 28 2a 20 52 65 71 75 69 |or;. |(* Requi|
|000050b0| 72 65 73 20 49 43 20 31 | 2e 31 2e 0d 20 20 20 20 |res IC 1|.1.. |
|000050c0| 20 2a 20 59 6f 75 20 6d | 75 73 74 20 73 70 65 63 | * You m|ust spec|
|000050d0| 69 66 79 20 61 20 63 6f | 6e 66 69 67 75 72 61 74 |ify a co|nfigurat|
|000050e0| 69 6f 6e 20 62 65 66 6f | 72 65 20 63 61 6c 6c 69 |ion befo|re calli|
|000050f0| 6e 67 20 74 68 69 73 20 | 72 6f 75 74 69 6e 65 2e |ng this |routine.|
|00005100| 0d 20 20 20 20 20 2a 20 | 59 6f 75 20 64 6f 20 6e |. * |You do n|
|00005110| 6f 74 20 68 61 76 65 20 | 74 6f 20 62 65 20 69 6e |ot have |to be in|
|00005120| 73 69 64 65 20 61 6e 20 | 49 43 42 65 67 69 6e 2f |side an |ICBegin/|
|00005130| 45 6e 64 20 70 61 69 72 | 20 74 6f 20 63 61 6c 6c |End pair| to call|
|00005140| 20 74 68 69 73 20 72 6f | 75 74 69 6e 65 2e 0d 20 | this ro|utine.. |
|00005150| 20 20 20 20 2a 20 54 61 | 6b 65 73 20 74 68 65 20 | * Ta|kes the |
|00005160| 6e 61 6d 65 20 6f 66 20 | 61 6e 20 69 6e 63 6f 6d |name of |an incom|
|00005170| 69 6e 67 20 66 69 6c 65 | 20 61 6e 64 20 72 65 74 |ing file| and ret|
|00005180| 75 72 6e 73 20 74 68 65 | 20 6d 6f 73 74 20 61 70 |urns the| most ap|
|00005190| 70 72 6f 70 72 69 61 74 | 65 0d 20 20 20 20 20 2a |propriat|e. *|
|000051a0| 20 6d 61 70 70 69 6e 67 | 73 20 64 61 74 61 62 61 | mapping|s databa|
|000051b0| 73 65 20 65 6e 74 72 79 | 2c 20 62 61 73 65 64 20 |se entry|, based |
|000051c0| 6f 6e 20 69 74 73 20 65 | 78 74 65 6e 73 69 6f 6e |on its e|xtension|
|000051d0| 2e 0d 20 20 20 20 20 2a | 20 65 6e 74 72 69 65 73 |.. *| entries|
|000051e0| 20 6d 75 73 74 20 62 65 | 20 61 20 68 61 6e 64 6c | must be| a handl|
|000051f0| 65 20 74 6f 20 61 20 76 | 61 6c 69 64 20 49 43 20 |e to a v|alid IC |
|00005200| 6d 61 70 70 69 6e 67 73 | 20 64 61 74 61 62 61 73 |mappings| databas|
|00005210| 65 20 70 72 65 66 65 72 | 65 6e 63 65 2e 0d 20 20 |e prefer|ence.. |
|00005220| 20 20 20 2a 20 66 69 6c | 65 6e 61 6d 65 20 6d 75 | * fil|ename mu|
|00005230| 73 74 20 6e 6f 74 20 62 | 65 20 74 68 65 20 65 6d |st not b|e the em|
|00005240| 70 74 79 20 73 74 72 69 | 6e 67 2e 0d 20 20 20 20 |pty stri|ng.. |
|00005250| 20 2a 20 52 65 74 75 72 | 6e 73 20 69 63 50 72 65 | * Retur|ns icPre|
|00005260| 66 4e 6f 74 46 6f 75 6e | 64 45 72 72 20 69 66 20 |fNotFoun|dErr if |
|00005270| 6e 6f 20 73 75 69 74 61 | 62 6c 65 20 65 6e 74 72 |no suita|ble entr|
|00005280| 79 20 69 73 20 66 6f 75 | 6e 64 2e 0d 20 20 20 20 |y is fou|nd.. |
|00005290| 20 2a 29 0d 20 20 0d 20 | 20 66 75 6e 63 74 69 6f | *). . | functio|
|000052a0| 6e 20 49 43 4d 61 70 45 | 6e 74 72 69 65 73 54 79 |n ICMapE|ntriesTy|
|000052b0| 70 65 43 72 65 61 74 6f | 72 28 69 6e 73 74 20 3a |peCreato|r(inst :|
|000052c0| 20 49 43 49 6e 73 74 61 | 6e 63 65 3b 20 65 6e 74 | ICInsta|nce; ent|
|000052d0| 72 69 65 73 20 3a 20 48 | 61 6e 64 6c 65 3b 20 66 |ries : H|andle; f|
|000052e0| 54 79 70 65 20 3a 20 4f | 53 54 79 70 65 3b 20 66 |Type : O|SType; f|
|000052f0| 43 72 65 61 74 6f 72 20 | 3a 20 4f 53 54 79 70 65 |Creator |: OSType|
|00005300| 3b 20 66 69 6c 65 6e 61 | 6d 65 20 3a 20 53 74 72 |; filena|me : Str|
|00005310| 32 35 35 3b 20 76 61 72 | 20 65 6e 74 72 79 20 3a |255; var| entry :|
|00005320| 20 49 43 4d 61 70 45 6e | 74 72 79 29 20 3a 20 49 | ICMapEn|try) : I|
|00005330| 43 45 72 72 6f 72 3b 0d | 20 20 20 20 28 2a 20 52 |CError;.| (* R|
|00005340| 65 71 75 69 72 65 73 20 | 49 43 20 31 2e 31 2e 0d |equires |IC 1.1..|
|00005350| 20 20 20 20 20 2a 20 59 | 6f 75 20 6d 75 73 74 20 | * Y|ou must |
|00005360| 73 70 65 63 69 66 79 20 | 61 20 63 6f 6e 66 69 67 |specify |a config|
|00005370| 75 72 61 74 69 6f 6e 20 | 62 65 66 6f 72 65 20 63 |uration |before c|
|00005380| 61 6c 6c 69 6e 67 20 74 | 68 69 73 20 72 6f 75 74 |alling t|his rout|
|00005390| 69 6e 65 2e 0d 20 20 20 | 20 20 2a 20 59 6f 75 20 |ine.. | * You |
|000053a0| 64 6f 20 6e 6f 74 20 68 | 61 76 65 20 74 6f 20 62 |do not h|ave to b|
|000053b0| 65 20 69 6e 73 69 64 65 | 20 61 6e 20 49 43 42 65 |e inside| an ICBe|
|000053c0| 67 69 6e 2f 45 6e 64 20 | 70 61 69 72 20 74 6f 20 |gin/End |pair to |
|000053d0| 63 61 6c 6c 20 74 68 69 | 73 20 72 6f 75 74 69 6e |call thi|s routin|
|000053e0| 65 2e 0d 20 20 20 20 20 | 2a 20 54 61 6b 65 73 20 |e.. |* Takes |
|000053f0| 74 68 65 20 74 79 70 65 | 20 61 6e 64 20 63 72 65 |the type| and cre|
|00005400| 61 74 6f 72 20 28 61 6e | 64 20 6f 70 74 69 6f 6e |ator (an|d option|
|00005410| 61 6c 6c 79 20 74 68 65 | 20 6e 61 6d 65 29 20 6f |ally the| name) o|
|00005420| 66 20 61 6e 20 6f 75 74 | 67 6f 69 6e 67 0d 20 20 |f an out|going. |
|00005430| 20 20 20 2a 20 66 69 6c | 65 20 61 6e 64 20 72 65 | * fil|e and re|
|00005440| 74 75 72 6e 73 20 74 68 | 65 20 6d 6f 73 74 20 61 |turns th|e most a|
|00005450| 70 70 72 6f 70 72 69 61 | 74 65 20 6d 61 70 70 69 |ppropria|te mappi|
|00005460| 6e 67 73 20 64 61 74 61 | 62 61 73 65 20 65 6e 74 |ngs data|base ent|
|00005470| 72 79 2e 0d 20 20 20 20 | 20 2a 20 65 6e 74 72 69 |ry.. | * entri|
|00005480| 65 73 20 6d 75 73 74 20 | 62 65 20 61 20 68 61 6e |es must |be a han|
|00005490| 64 6c 65 20 74 6f 20 61 | 20 76 61 6c 69 64 20 49 |dle to a| valid I|
|000054a0| 43 20 6d 61 70 70 69 6e | 67 73 20 64 61 74 61 62 |C mappin|gs datab|
|000054b0| 61 73 65 20 70 72 65 66 | 65 72 65 6e 63 65 2e 0d |ase pref|erence..|
|000054c0| 20 20 20 20 20 2a 20 54 | 68 65 20 66 69 6c 65 6e | * T|he filen|
|000054d0| 61 6d 65 20 6d 61 79 20 | 62 65 20 65 69 74 68 65 |ame may |be eithe|
|000054e0| 72 20 74 68 65 20 6e 61 | 6d 65 20 6f 66 20 74 68 |r the na|me of th|
|000054f0| 65 20 6f 75 74 67 6f 69 | 6e 67 20 66 69 6c 65 20 |e outgoi|ng file |
|00005500| 6f 72 0d 20 20 20 20 20 | 2a 20 74 68 65 20 65 6d |or. |* the em|
|00005510| 70 74 79 20 73 74 72 69 | 6e 67 2e 0d 20 20 20 20 |pty stri|ng.. |
|00005520| 20 2a 20 52 65 74 75 72 | 6e 73 20 69 63 50 72 65 | * Retur|ns icPre|
|00005530| 66 4e 6f 74 46 6f 75 6e | 64 45 72 72 20 69 66 20 |fNotFoun|dErr if |
|00005540| 6e 6f 20 73 75 69 74 61 | 62 6c 65 20 65 6e 74 72 |no suita|ble entr|
|00005550| 79 20 66 6f 75 6e 64 2e | 0d 20 20 20 20 20 2a 29 |y found.|. *)|
|00005560| 0d 20 20 0d 20 20 28 2a | 20 2d 2d 2d 2d 2d 20 4c |. . (*| ----- L|
|00005570| 6f 77 20 4c 65 76 65 6c | 20 52 6f 75 74 69 6e 65 |ow Level| Routine|
|00005580| 73 20 2d 2d 2d 2d 2d 20 | 2a 29 0d 20 20 0d 20 20 |s ----- |*). . |
|00005590| 66 75 6e 63 74 69 6f 6e | 20 49 43 43 6f 75 6e 74 |function| ICCount|
|000055a0| 4d 61 70 45 6e 74 72 69 | 65 73 28 69 6e 73 74 20 |MapEntri|es(inst |
|000055b0| 3a 20 49 43 49 6e 73 74 | 61 6e 63 65 3b 20 65 6e |: ICInst|ance; en|
|000055c0| 74 72 69 65 73 20 3a 20 | 48 61 6e 64 6c 65 3b 20 |tries : |Handle; |
|000055d0| 76 61 72 20 63 6f 75 6e | 74 20 3a 20 6c 6f 6e 67 |var coun|t : long|
|000055e0| 69 6e 74 29 20 3a 20 49 | 43 45 72 72 6f 72 3b 0d |int) : I|CError;.|
|000055f0| 20 20 20 20 28 2a 20 52 | 65 71 75 69 72 65 73 20 | (* R|equires |
|00005600| 49 43 20 31 2e 31 2e 0d | 20 20 20 20 20 2a 20 59 |IC 1.1..| * Y|
|00005610| 6f 75 20 6d 75 73 74 20 | 73 70 65 63 69 66 79 20 |ou must |specify |
|00005620| 61 20 63 6f 6e 66 69 67 | 75 72 61 74 69 6f 6e 20 |a config|uration |
|00005630| 62 65 66 6f 72 65 20 63 | 61 6c 6c 69 6e 67 20 74 |before c|alling t|
|00005640| 68 69 73 20 72 6f 75 74 | 69 6e 65 2e 0d 20 20 20 |his rout|ine.. |
|00005650| 20 20 2a 20 59 6f 75 20 | 64 6f 20 6e 6f 74 20 68 | * You |do not h|
|00005660| 61 76 65 20 74 6f 20 62 | 65 20 69 6e 73 69 64 65 |ave to b|e inside|
|00005670| 20 61 6e 20 49 43 42 65 | 67 69 6e 2f 45 6e 64 20 | an ICBe|gin/End |
|00005680| 70 61 69 72 20 74 6f 20 | 63 61 6c 6c 20 74 68 69 |pair to |call thi|
|00005690| 73 20 72 6f 75 74 69 6e | 65 2e 0d 20 20 20 20 20 |s routin|e.. |
|000056a0| 2a 20 43 6f 75 6e 74 73 | 20 74 68 65 20 6e 75 6d |* Counts| the num|
|000056b0| 62 65 72 20 6f 66 20 65 | 6e 74 72 69 65 73 20 69 |ber of e|ntries i|
|000056c0| 6e 20 74 68 65 20 6d 61 | 70 70 69 6e 67 73 20 64 |n the ma|ppings d|
|000056d0| 61 74 61 62 61 73 65 2e | 0d 20 20 20 20 20 2a 20 |atabase.|. * |
|000056e0| 65 6e 74 72 69 65 73 20 | 6d 75 73 74 20 62 65 20 |entries |must be |
|000056f0| 61 20 68 61 6e 64 6c 65 | 20 74 6f 20 61 20 76 61 |a handle| to a va|
|00005700| 6c 69 64 20 49 43 20 6d | 61 70 70 69 6e 67 73 20 |lid IC m|appings |
|00005710| 64 61 74 61 62 61 73 65 | 20 70 72 65 66 65 72 65 |database| prefere|
|00005720| 6e 63 65 2e 0d 20 20 20 | 20 20 2a 20 63 6f 75 6e |nce.. | * coun|
|00005730| 74 20 69 73 20 73 65 74 | 20 74 6f 20 74 68 65 20 |t is set| to the |
|00005740| 6e 75 6d 62 65 72 20 6f | 66 20 65 6e 74 72 69 65 |number o|f entrie|
|00005750| 73 2e 0d 20 20 20 20 20 | 2a 29 0d 20 20 0d 20 20 |s.. |*). . |
|00005760| 66 75 6e 63 74 69 6f 6e | 20 49 43 47 65 74 49 6e |function| ICGetIn|
|00005770| 64 4d 61 70 45 6e 74 72 | 79 28 69 6e 73 74 20 3a |dMapEntr|y(inst :|
|00005780| 20 49 43 49 6e 73 74 61 | 6e 63 65 3b 20 65 6e 74 | ICInsta|nce; ent|
|00005790| 72 69 65 73 20 3a 20 48 | 61 6e 64 6c 65 3b 20 6e |ries : H|andle; n|
|000057a0| 64 78 20 3a 20 6c 6f 6e | 67 69 6e 74 3b 20 76 61 |dx : lon|gint; va|
|000057b0| 72 20 70 6f 73 20 3a 20 | 6c 6f 6e 67 69 6e 74 3b |r pos : |longint;|
|000057c0| 20 76 61 72 20 65 6e 74 | 72 79 20 3a 20 49 43 4d | var ent|ry : ICM|
|000057d0| 61 70 45 6e 74 72 79 29 | 20 3a 20 49 43 45 72 72 |apEntry)| : ICErr|
|000057e0| 6f 72 3b 0d 20 20 20 20 | 28 2a 20 52 65 71 75 69 |or;. |(* Requi|
|000057f0| 72 65 73 20 49 43 20 31 | 2e 31 2e 0d 20 20 20 20 |res IC 1|.1.. |
|00005800| 20 2a 20 59 6f 75 20 6d | 75 73 74 20 73 70 65 63 | * You m|ust spec|
|00005810| 69 66 79 20 61 20 63 6f | 6e 66 69 67 75 72 61 74 |ify a co|nfigurat|
|00005820| 69 6f 6e 20 62 65 66 6f | 72 65 20 63 61 6c 6c 69 |ion befo|re calli|
|00005830| 6e 67 20 74 68 69 73 20 | 72 6f 75 74 69 6e 65 2e |ng this |routine.|
|00005840| 0d 20 20 20 20 20 2a 20 | 59 6f 75 20 64 6f 20 6e |. * |You do n|
|00005850| 6f 74 20 68 61 76 65 20 | 74 6f 20 62 65 20 69 6e |ot have |to be in|
|00005860| 73 69 64 65 20 61 6e 20 | 49 43 42 65 67 69 6e 2f |side an |ICBegin/|
|00005870| 45 6e 64 20 70 61 69 72 | 20 74 6f 20 63 61 6c 6c |End pair| to call|
|00005880| 20 74 68 69 73 20 72 6f | 75 74 69 6e 65 2e 0d 20 | this ro|utine.. |
|00005890| 20 20 20 20 2a 20 47 65 | 74 73 20 74 68 65 20 6e | * Ge|ts the n|
|000058a0| 64 78 27 74 68 20 65 6e | 74 72 79 20 69 6e 20 74 |dx'th en|try in t|
|000058b0| 68 65 20 6d 61 70 70 69 | 6e 67 73 20 64 61 74 61 |he mappi|ngs data|
|000058c0| 62 61 73 65 2e 0d 20 20 | 20 20 20 2a 20 65 6e 74 |base.. | * ent|
|000058d0| 72 69 65 73 20 6d 75 73 | 74 20 62 65 20 61 20 68 |ries mus|t be a h|
|000058e0| 61 6e 64 6c 65 20 74 6f | 20 61 20 76 61 6c 69 64 |andle to| a valid|
|000058f0| 20 49 43 20 6d 61 70 70 | 69 6e 67 73 20 64 61 74 | IC mapp|ings dat|
|00005900| 61 62 61 73 65 20 70 72 | 65 66 65 72 65 6e 63 65 |abase pr|eference|
|00005910| 2e 0d 20 20 20 20 20 2a | 20 6e 64 78 20 6d 75 73 |.. *| ndx mus|
|00005920| 74 20 62 65 20 69 6e 20 | 74 68 65 20 72 61 6e 67 |t be in |the rang|
|00005930| 65 20 66 72 6f 6d 20 31 | 20 74 6f 20 74 68 65 20 |e from 1| to the |
|00005940| 6e 75 6d 62 65 72 20 6f | 66 20 65 6e 74 72 69 65 |number o|f entrie|
|00005950| 73 20 69 6e 20 74 68 65 | 20 64 61 74 61 62 61 73 |s in the| databas|
|00005960| 65 2e 0d 20 20 20 20 20 | 2a 20 54 68 65 20 76 61 |e.. |* The va|
|00005970| 6c 75 65 20 6f 66 20 70 | 6f 73 20 69 73 20 69 67 |lue of p|os is ig|
|00005980| 6e 6f 72 65 64 20 6f 6e | 20 69 6e 70 75 74 2e 20 |nored on| input. |
|00005990| 70 6f 73 20 69 73 20 73 | 65 74 20 74 6f 20 74 68 |pos is s|et to th|
|000059a0| 65 20 70 6f 73 69 74 69 | 6f 6e 20 6f 66 0d 20 20 |e positi|on of. |
|000059b0| 20 20 20 2a 20 74 68 65 | 20 6e 64 78 27 74 68 20 | * the| ndx'th |
|000059c0| 65 6e 74 72 79 20 69 6e | 20 74 68 65 20 64 61 74 |entry in| the dat|
|000059d0| 61 62 61 73 65 20 61 6e | 64 20 69 73 20 73 75 69 |abase an|d is sui|
|000059e0| 74 61 62 6c 65 20 66 6f | 72 20 70 61 73 73 69 6e |table fo|r passin|
|000059f0| 67 20 62 61 63 6b 0d 20 | 20 20 20 20 2a 20 69 6e |g back. | * in|
|00005a00| 74 6f 20 49 43 53 65 74 | 4d 61 70 45 6e 74 72 79 |to ICSet|MapEntry|
|00005a10| 2e 0d 20 20 20 20 20 2a | 20 44 6f 65 73 20 6e 6f |.. *| Does no|
|00005a20| 74 20 72 65 74 75 72 6e | 20 61 6e 79 20 75 73 65 |t return| any use|
|00005a30| 72 20 64 61 74 61 20 61 | 73 73 6f 63 69 61 74 65 |r data a|ssociate|
|00005a40| 64 20 77 69 74 68 20 74 | 68 65 20 65 6e 74 72 79 |d with t|he entry|
|00005a50| 2e 0d 20 20 20 20 20 2a | 29 0d 20 20 0d 20 20 66 |.. *|). . f|
|00005a60| 75 6e 63 74 69 6f 6e 20 | 49 43 47 65 74 4d 61 70 |unction |ICGetMap|
|00005a70| 45 6e 74 72 79 28 69 6e | 73 74 20 3a 20 49 43 49 |Entry(in|st : ICI|
|00005a80| 6e 73 74 61 6e 63 65 3b | 20 65 6e 74 72 69 65 73 |nstance;| entries|
|00005a90| 20 3a 20 48 61 6e 64 6c | 65 3b 20 70 6f 73 20 3a | : Handl|e; pos :|
|00005aa0| 20 6c 6f 6e 67 69 6e 74 | 3b 20 76 61 72 20 65 6e | longint|; var en|
|00005ab0| 74 72 79 20 3a 20 49 43 | 4d 61 70 45 6e 74 72 79 |try : IC|MapEntry|
|00005ac0| 29 20 3a 20 49 43 45 72 | 72 6f 72 3b 0d 20 20 20 |) : ICEr|ror;. |
|00005ad0| 20 28 2a 20 52 65 71 75 | 69 72 65 73 20 49 43 20 | (* Requ|ires IC |
|00005ae0| 31 2e 31 2e 0d 20 20 20 | 20 20 2a 20 59 6f 75 20 |1.1.. | * You |
|00005af0| 6d 75 73 74 20 73 70 65 | 63 69 66 79 20 61 20 63 |must spe|cify a c|
|00005b00| 6f 6e 66 69 67 75 72 61 | 74 69 6f 6e 20 62 65 66 |onfigura|tion bef|
|00005b10| 6f 72 65 20 63 61 6c 6c | 69 6e 67 20 74 68 69 73 |ore call|ing this|
|00005b20| 20 72 6f 75 74 69 6e 65 | 2e 0d 20 20 20 20 20 2a | routine|.. *|
|00005b30| 20 59 6f 75 20 64 6f 20 | 6e 6f 74 20 68 61 76 65 | You do |not have|
|00005b40| 20 74 6f 20 62 65 20 69 | 6e 73 69 64 65 20 61 6e | to be i|nside an|
|00005b50| 20 49 43 42 65 67 69 6e | 2f 45 6e 64 20 70 61 69 | ICBegin|/End pai|
|00005b60| 72 20 74 6f 20 63 61 6c | 6c 20 74 68 69 73 20 72 |r to cal|l this r|
|00005b70| 6f 75 74 69 6e 65 2e 0d | 20 20 20 20 20 2a 20 52 |outine..| * R|
|00005b80| 65 74 75 72 6e 73 20 74 | 68 65 20 65 6e 74 72 79 |eturns t|he entry|
|00005b90| 20 6c 6f 63 61 74 65 64 | 20 61 74 20 70 6f 73 69 | located| at posi|
|00005ba0| 74 69 6f 6e 20 70 6f 73 | 20 69 6e 20 74 68 65 20 |tion pos| in the |
|00005bb0| 6d 61 70 70 69 6e 67 73 | 20 64 61 74 61 62 61 73 |mappings| databas|
|00005bc0| 65 2e 0d 20 20 20 20 20 | 2a 20 65 6e 74 72 69 65 |e.. |* entrie|
|00005bd0| 73 20 6d 75 73 74 20 62 | 65 20 61 20 68 61 6e 64 |s must b|e a hand|
|00005be0| 6c 65 20 74 6f 20 61 20 | 76 61 6c 69 64 20 49 43 |le to a |valid IC|
|00005bf0| 20 6d 61 70 70 69 6e 67 | 73 20 64 61 74 61 62 61 | mapping|s databa|
|00005c00| 73 65 20 70 72 65 66 65 | 72 65 6e 63 65 2e 0d 20 |se prefe|rence.. |
|00005c10| 20 20 20 20 2a 20 70 6f | 73 20 73 68 6f 75 6c 64 | * po|s should|
|00005c20| 20 62 65 20 30 20 74 6f | 20 67 65 74 20 74 68 65 | be 0 to| get the|
|00005c30| 20 66 69 72 73 74 20 65 | 6e 74 72 79 2e 20 54 6f | first e|ntry. To|
|00005c40| 20 67 65 74 20 74 68 65 | 20 73 75 62 73 65 71 75 | get the| subsequ|
|00005c50| 65 6e 74 20 65 6e 74 72 | 69 65 73 2c 20 61 64 64 |ent entr|ies, add|
|00005c60| 0d 20 20 20 20 20 2a 20 | 65 6e 74 72 79 2e 74 6f |. * |entry.to|
|00005c70| 74 61 6c 5f 73 69 7a 65 | 20 74 6f 20 70 6f 73 20 |tal_size| to pos |
|00005c80| 61 6e 64 20 69 74 65 72 | 61 74 65 2e 0d 20 20 20 |and iter|ate.. |
|00005c90| 20 20 2a 20 44 6f 65 73 | 20 6e 6f 74 20 72 65 74 | * Does| not ret|
|00005ca0| 75 72 6e 20 61 6e 79 20 | 75 73 65 72 20 64 61 74 |urn any |user dat|
|00005cb0| 61 20 61 73 73 6f 63 69 | 61 74 65 64 20 77 69 74 |a associ|ated wit|
|00005cc0| 68 20 74 68 65 20 65 6e | 74 72 79 2e 0d 20 20 20 |h the en|try.. |
|00005cd0| 20 20 2a 29 0d 20 20 0d | 20 20 66 75 6e 63 74 69 | *). .| functi|
|00005ce0| 6f 6e 20 49 43 53 65 74 | 4d 61 70 45 6e 74 72 79 |on ICSet|MapEntry|
|00005cf0| 28 69 6e 73 74 20 3a 20 | 49 43 49 6e 73 74 61 6e |(inst : |ICInstan|
|00005d00| 63 65 3b 20 65 6e 74 72 | 69 65 73 20 3a 20 48 61 |ce; entr|ies : Ha|
|00005d10| 6e 64 6c 65 3b 20 70 6f | 73 20 3a 20 6c 6f 6e 67 |ndle; po|s : long|
|00005d20| 69 6e 74 3b 20 76 61 72 | 20 65 6e 74 72 79 20 3a |int; var| entry :|
|00005d30| 20 49 43 4d 61 70 45 6e | 74 72 79 29 20 3a 20 49 | ICMapEn|try) : I|
|00005d40| 43 45 72 72 6f 72 3b 0d | 20 20 20 20 28 2a 20 52 |CError;.| (* R|
|00005d50| 65 71 75 69 72 65 73 20 | 49 43 20 31 2e 31 2e 0d |equires |IC 1.1..|
|00005d60| 20 20 20 20 20 2a 20 59 | 6f 75 20 6d 75 73 74 20 | * Y|ou must |
|00005d70| 73 70 65 63 69 66 79 20 | 61 20 63 6f 6e 66 69 67 |specify |a config|
|00005d80| 75 72 61 74 69 6f 6e 20 | 62 65 66 6f 72 65 20 63 |uration |before c|
|00005d90| 61 6c 6c 69 6e 67 20 74 | 68 69 73 20 72 6f 75 74 |alling t|his rout|
|00005da0| 69 6e 65 2e 0d 20 20 20 | 20 20 2a 20 59 6f 75 20 |ine.. | * You |
|00005db0| 64 6f 20 6e 6f 74 20 68 | 61 76 65 20 74 6f 20 62 |do not h|ave to b|
|00005dc0| 65 20 69 6e 73 69 64 65 | 20 61 6e 20 49 43 42 65 |e inside| an ICBe|
|00005dd0| 67 69 6e 2f 45 6e 64 20 | 70 61 69 72 20 74 6f 20 |gin/End |pair to |
|00005de0| 63 61 6c 6c 20 74 68 69 | 73 20 72 6f 75 74 69 6e |call thi|s routin|
|00005df0| 65 2e 0d 20 20 20 20 20 | 2a 20 53 65 74 73 20 74 |e.. |* Sets t|
|00005e00| 68 65 20 65 6e 74 72 79 | 20 6c 6f 63 61 74 65 64 |he entry| located|
|00005e10| 20 61 74 20 70 6f 73 69 | 74 69 6f 6e 20 70 6f 73 | at posi|tion pos|
|00005e20| 20 69 6e 20 74 68 65 20 | 6d 61 70 70 69 6e 67 73 | in the |mappings|
|00005e30| 20 64 61 74 61 62 61 73 | 65 2e 0d 20 20 20 20 20 | databas|e.. |
|00005e40| 2a 20 65 6e 74 72 69 65 | 73 20 6d 75 73 74 20 62 |* entrie|s must b|
|00005e50| 65 20 61 20 68 61 6e 64 | 6c 65 20 74 6f 20 61 20 |e a hand|le to a |
|00005e60| 76 61 6c 69 64 20 49 43 | 20 6d 61 70 70 69 6e 67 |valid IC| mapping|
|00005e70| 73 20 64 61 74 61 62 61 | 73 65 20 70 72 65 66 65 |s databa|se prefe|
|00005e80| 72 65 6e 63 65 2e 0d 20 | 20 20 20 20 2a 20 70 6f |rence.. | * po|
|00005e90| 73 20 73 68 6f 75 6c 64 | 20 62 65 20 65 69 74 68 |s should| be eith|
|00005ea0| 65 72 20 61 20 76 61 6c | 75 65 20 72 65 74 75 72 |er a val|ue retur|
|00005eb0| 6e 65 64 20 66 72 6f 6d | 20 49 43 47 65 74 49 6e |ned from| ICGetIn|
|00005ec0| 64 4d 61 70 45 6e 74 72 | 79 20 6f 72 20 61 20 76 |dMapEntr|y or a v|
|00005ed0| 61 6c 75 65 0d 20 20 20 | 20 20 2a 20 63 61 6c 63 |alue. | * calc|
|00005ee0| 75 6c 61 74 65 64 20 75 | 73 69 6e 67 20 49 43 47 |ulated u|sing ICG|
|00005ef0| 65 74 4d 61 70 45 6e 74 | 72 79 2e 0d 20 20 20 20 |etMapEnt|ry.. |
|00005f00| 20 2a 20 65 6e 74 72 79 | 20 69 73 20 61 20 76 61 | * entry| is a va|
|00005f10| 72 20 70 61 72 61 6d 65 | 74 65 72 20 70 75 72 65 |r parame|ter pure|
|00005f20| 6c 79 20 66 6f 72 20 73 | 74 61 63 6b 20 73 70 61 |ly for s|tack spa|
|00005f30| 63 65 20 72 65 61 73 6f | 6e 73 2e 20 49 74 20 69 |ce reaso|ns. It i|
|00005f40| 73 20 6e 6f 74 0d 20 20 | 20 20 20 2a 20 6d 6f 64 |s not. | * mod|
|00005f50| 69 66 69 65 64 20 69 6e | 20 61 6e 79 20 77 61 79 |ified in| any way|
|00005f60| 2e 0d 20 20 20 20 20 2a | 20 41 6e 79 20 75 73 65 |.. *| Any use|
|00005f70| 72 20 64 61 74 61 20 61 | 73 73 6f 63 69 61 74 65 |r data a|ssociate|
|00005f80| 64 20 77 69 74 68 20 74 | 68 65 20 65 6e 74 72 79 |d with t|he entry|
|00005f90| 20 69 73 20 75 6e 6d 6f | 64 69 66 69 65 64 2e 0d | is unmo|dified..|
|00005fa0| 20 20 20 20 20 2a 29 0d | 20 20 0d 20 20 66 75 6e | *).| . fun|
|00005fb0| 63 74 69 6f 6e 20 49 43 | 44 65 6c 65 74 65 4d 61 |ction IC|DeleteMa|
|00005fc0| 70 45 6e 74 72 79 28 69 | 6e 73 74 20 3a 20 49 43 |pEntry(i|nst : IC|
|00005fd0| 49 6e 73 74 61 6e 63 65 | 3b 20 65 6e 74 72 69 65 |Instance|; entrie|
|00005fe0| 73 20 3a 20 48 61 6e 64 | 6c 65 3b 20 70 6f 73 20 |s : Hand|le; pos |
|00005ff0| 3a 20 6c 6f 6e 67 69 6e | 74 29 20 3a 20 49 43 45 |: longin|t) : ICE|
|00006000| 72 72 6f 72 3b 0d 20 20 | 20 20 28 2a 20 52 65 71 |rror;. | (* Req|
|00006010| 75 69 72 65 73 20 49 43 | 20 31 2e 31 2e 0d 20 20 |uires IC| 1.1.. |
|00006020| 20 20 20 2a 20 59 6f 75 | 20 6d 75 73 74 20 73 70 | * You| must sp|
|00006030| 65 63 69 66 79 20 61 20 | 63 6f 6e 66 69 67 75 72 |ecify a |configur|
|00006040| 61 74 69 6f 6e 20 62 65 | 66 6f 72 65 20 63 61 6c |ation be|fore cal|
|00006050| 6c 69 6e 67 20 74 68 69 | 73 20 72 6f 75 74 69 6e |ling thi|s routin|
|00006060| 65 2e 0d 20 20 20 20 20 | 2a 20 59 6f 75 20 64 6f |e.. |* You do|
|00006070| 20 6e 6f 74 20 68 61 76 | 65 20 74 6f 20 62 65 20 | not hav|e to be |
|00006080| 69 6e 73 69 64 65 20 61 | 6e 20 49 43 42 65 67 69 |inside a|n ICBegi|
|00006090| 6e 2f 45 6e 64 20 70 61 | 69 72 20 74 6f 20 63 61 |n/End pa|ir to ca|
|000060a0| 6c 6c 20 74 68 69 73 20 | 72 6f 75 74 69 6e 65 2e |ll this |routine.|
|000060b0| 0d 20 20 20 20 20 2a 20 | 44 65 6c 65 74 65 73 20 |. * |Deletes |
|000060c0| 74 68 65 20 6d 61 70 70 | 69 6e 67 73 20 64 61 74 |the mapp|ings dat|
|000060d0| 61 62 61 73 65 20 65 6e | 74 72 79 20 61 74 20 70 |abase en|try at p|
|000060e0| 6f 73 2e 0d 20 20 20 20 | 20 2a 20 65 6e 74 72 69 |os.. | * entri|
|000060f0| 65 73 20 6d 75 73 74 20 | 62 65 20 61 20 68 61 6e |es must |be a han|
|00006100| 64 6c 65 20 74 6f 20 61 | 20 76 61 6c 69 64 20 49 |dle to a| valid I|
|00006110| 43 20 6d 61 70 70 69 6e | 67 73 20 64 61 74 61 62 |C mappin|gs datab|
|00006120| 61 73 65 20 70 72 65 66 | 65 72 65 6e 63 65 2e 0d |ase pref|erence..|
|00006130| 20 20 20 20 20 2a 20 70 | 6f 73 20 73 68 6f 75 6c | * p|os shoul|
|00006140| 64 20 62 65 20 65 69 74 | 68 65 72 20 61 20 76 61 |d be eit|her a va|
|00006150| 6c 75 65 20 72 65 74 75 | 72 6e 65 64 20 66 72 6f |lue retu|rned fro|
|00006160| 6d 20 49 43 47 65 74 49 | 6e 64 4d 61 70 45 6e 74 |m ICGetI|ndMapEnt|
|00006170| 72 79 20 6f 72 20 61 20 | 76 61 6c 75 65 0d 20 20 |ry or a |value. |
|00006180| 20 20 20 2a 20 63 61 6c | 63 75 6c 61 74 65 64 20 | * cal|culated |
|00006190| 75 73 69 6e 67 20 49 43 | 47 65 74 4d 61 70 45 6e |using IC|GetMapEn|
|000061a0| 74 72 79 2e 0d 20 20 20 | 20 20 2a 20 41 6c 73 6f |try.. | * Also|
|000061b0| 20 64 65 6c 65 74 65 73 | 20 61 6e 79 20 75 73 65 | deletes| any use|
|000061c0| 72 20 64 61 74 61 20 61 | 73 73 6f 63 69 61 74 65 |r data a|ssociate|
|000061d0| 64 20 77 69 74 68 20 74 | 68 65 20 65 6e 74 72 79 |d with t|he entry|
|000061e0| 2e 0d 20 20 20 20 20 2a | 29 0d 20 20 0d 20 20 66 |.. *|). . f|
|000061f0| 75 6e 63 74 69 6f 6e 20 | 49 43 41 64 64 4d 61 70 |unction |ICAddMap|
|00006200| 45 6e 74 72 79 28 69 6e | 73 74 20 3a 20 49 43 49 |Entry(in|st : ICI|
|00006210| 6e 73 74 61 6e 63 65 3b | 20 65 6e 74 72 69 65 73 |nstance;| entries|
|00006220| 20 3a 20 48 61 6e 64 6c | 65 3b 20 76 61 72 20 65 | : Handl|e; var e|
|00006230| 6e 74 72 79 20 3a 20 49 | 43 4d 61 70 45 6e 74 72 |ntry : I|CMapEntr|
|00006240| 79 29 20 3a 20 49 43 45 | 72 72 6f 72 3b 0d 20 20 |y) : ICE|rror;. |
|00006250| 20 20 28 2a 20 52 65 71 | 75 69 72 65 73 20 49 43 | (* Req|uires IC|
|00006260| 20 31 2e 31 2e 0d 20 20 | 20 20 20 2a 20 59 6f 75 | 1.1.. | * You|
|00006270| 20 6d 75 73 74 20 73 70 | 65 63 69 66 79 20 61 20 | must sp|ecify a |
|00006280| 63 6f 6e 66 69 67 75 72 | 61 74 69 6f 6e 20 62 65 |configur|ation be|
|00006290| 66 6f 72 65 20 63 61 6c | 6c 69 6e 67 20 74 68 69 |fore cal|ling thi|
|000062a0| 73 20 72 6f 75 74 69 6e | 65 2e 0d 20 20 20 20 20 |s routin|e.. |
|000062b0| 2a 20 59 6f 75 20 64 6f | 20 6e 6f 74 20 68 61 76 |* You do| not hav|
|000062c0| 65 20 74 6f 20 62 65 20 | 69 6e 73 69 64 65 20 61 |e to be |inside a|
|000062d0| 6e 20 49 43 42 65 67 69 | 6e 2f 45 6e 64 20 70 61 |n ICBegi|n/End pa|
|000062e0| 69 72 20 74 6f 20 63 61 | 6c 6c 20 74 68 69 73 20 |ir to ca|ll this |
|000062f0| 72 6f 75 74 69 6e 65 2e | 0d 20 20 20 20 20 2a 20 |routine.|. * |
|00006300| 41 64 64 73 20 61 6e 20 | 65 6e 74 72 79 20 74 6f |Adds an |entry to|
|00006310| 20 74 68 65 20 6d 61 70 | 70 69 6e 67 73 20 64 61 | the map|pings da|
|00006320| 74 61 62 61 73 65 2e 0d | 20 20 20 20 20 2a 20 65 |tabase..| * e|
|00006330| 6e 74 72 69 65 73 20 6d | 75 73 74 20 62 65 20 61 |ntries m|ust be a|
|00006340| 20 68 61 6e 64 6c 65 20 | 74 6f 20 61 20 76 61 6c | handle |to a val|
|00006350| 69 64 20 49 43 20 6d 61 | 70 70 69 6e 67 73 20 64 |id IC ma|ppings d|
|00006360| 61 74 61 62 61 73 65 20 | 70 72 65 66 65 72 65 6e |atabase |preferen|
|00006370| 63 65 2e 0d 20 20 20 20 | 20 2a 20 54 68 65 20 65 |ce.. | * The e|
|00006380| 6e 74 72 79 20 69 73 20 | 61 64 64 65 64 20 74 6f |ntry is |added to|
|00006390| 20 74 68 65 20 65 6e 64 | 20 6f 66 20 74 68 65 20 | the end| of the |
|000063a0| 65 6e 74 72 69 65 73 20 | 64 61 74 61 62 61 73 65 |entries |database|
|000063b0| 2e 0d 20 20 20 20 20 2a | 20 4e 6f 20 75 73 65 72 |.. *| No user|
|000063c0| 20 64 61 74 61 20 69 73 | 20 61 64 64 65 64 2e 0d | data is| added..|
|000063d0| 20 20 20 20 20 2a 29 0d | 20 20 0d 0d 28 2a 20 a5 | *).| ..(* .|
|000063e0| a5 a5 45 6e 64 20 49 43 | 41 50 49 2e 70 a5 a5 a5 |..End IC|API.p...|
|000063f0| 20 2a 29 0d 0d 69 6d 70 | 6c 65 6d 65 6e 74 61 74 | *)..imp|lementat|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.